Interface IIngredientCollectionLike<T,M,I>

Type Parameters:
T - The instance type.
M - The matching condition parameter.
I - The type that can be iterated over. This is typically just T.
All Superinterfaces:
Iterable<I>
All Known Subinterfaces:
IIngredientCollapsedCollection<T,M>, IIngredientCollapsedCollectionMutable<T,M>, IIngredientCollection<T,M>, IIngredientCollectionLikeMultiClassifiedTrait<T,M,I,L>, IIngredientCollectionLikeSingleClassifiedTrait<T,M,I,C,L>, IIngredientCollectionMutable<T,M>, IIngredientList<T,M>, IIngredientListMutable<T,M>, IIngredientMap<T,M,V>, IIngredientMapMutable<T,M,V>, IIngredientSet<T,M>, IIngredientSetMutable<T,M>
All Known Implementing Classes:
IngredientArrayList, IngredientCollectionAdapter, IngredientCollectionCollectionAdapter, IngredientCollectionCollectionWrappedAdapter, IngredientCollectionEmpty, IngredientCollectionMultiClassified, IngredientCollectionMutableWrapper, IngredientCollectionPrototypeMap, IngredientCollectionQuantitativeGrouper, IngredientCollectionSingleClassified, IngredientCollectionSingleClassifiedCollapsed, IngredientCollectionWrapper, IngredientHashMap, IngredientHashSet, IngredientLinkedList, IngredientList, IngredientMapAdapter, IngredientMapMultiClassified, IngredientMapSingleClassified, IngredientMapWrappedAdapter, IngredientSet, IngredientTreeMap, IngredientTreeSet

public interface IIngredientCollectionLike<T,M,I> extends Iterable<I>
A collection-like thing that contains ingredient component instances.
  • Method Details

    • getComponent

      IngredientComponent<T,M> getComponent()
      Returns:
      The ingredient component type of which this collection contains instances.
    • size

      int size()
      Returns:
      The number of instances contained in this collection.
    • isEmpty

      default boolean isEmpty()
      Returns:
      If the are no instances in this collection.
    • iterator

      Iterator<I> iterator(T instance, M matchCondition)
      An iterator over this collection over all occurrences of the given instance under the given match conditions.
      Parameters:
      instance - An instance.
      matchCondition - A match condition.
      Returns:
      An iterator over this collection over all occurrences of the given instance under the given match conditions.
    • equals

      boolean equals(Object o)
      Check if this collection equals the given object.
      Overrides:
      equals in class Object
      Parameters:
      o - An object.
      Returns:
      True if the given object is an ingredient collection of the same type, component type and contains the same instances.
    • hashCode

      int hashCode()
      Overrides:
      hashCode in class Object
      Returns:
      A hashcode of this collection, based on the hash codes, provided by the component type.
    • toString

      String toString()
      Overrides:
      toString in class Object
      Returns:
      A string representation of this collection, provided by the component type.