Class FilteredIngredientCollectionIterator<T,M>
java.lang.Object
org.cyclops.cyclopscore.ingredient.collection.FilteredIngredientCollectionIterator<T,M>
- Type Parameters:
T
- The instance type.M
- The matching condition parameter.
- All Implemented Interfaces:
Iterator<T>
An iterator that filters over an instances collection based on an instance with a match condition.
-
Constructor Summary
ConstructorDescriptionFilteredIngredientCollectionIterator
(Iterable<T> iterable, IIngredientMatcher<T, M> matcher, T instance, M matchCondition) Create a new instance.FilteredIngredientCollectionIterator
(Iterator<T> iterator, IIngredientMatcher<T, M> matcher, T instance, M matchCondition) Create a new instance. -
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.util.Iterator
forEachRemaining
-
Constructor Details
-
FilteredIngredientCollectionIterator
public FilteredIngredientCollectionIterator(Iterable<T> iterable, IIngredientMatcher<T, M> matcher, T instance, M matchCondition) Create a new instance.- Parameters:
iterable
- An iterable with instances.matcher
- A matcher for the type of instances.instance
- An instance to match.matchCondition
- A match condition to filter by.
-
FilteredIngredientCollectionIterator
public FilteredIngredientCollectionIterator(Iterator<T> iterator, IIngredientMatcher<T, M> matcher, T instance, M matchCondition) Create a new instance.- Parameters:
iterator
- An iterator with instances.matcher
- A matcher for the type of instances.instance
- An instance to match.matchCondition
- A match condition to filter by.
-
-
Method Details