Class IngredientCollectionEmpty<T,M>
java.lang.Object
org.cyclops.cyclopscore.ingredient.collection.IngredientCollectionEmpty<T,M>
- Type Parameters:
T
- The instance type.M
- The matching condition parameter.
- All Implemented Interfaces:
Iterable<T>
,IIngredientCollection<T,
,M> IIngredientCollectionLike<T,
M, T>
An empty immutable ingredient collection.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Check if this collection contains the given instance.boolean
Check if this collection contains the given instance under the given match conditions.int
Count the number of occurrences of the given instance under the given match conditions.boolean
Check if this collection equals the given object.int
hashCode()
iterator()
An iterator over this collection over all occurrences of the given instance under the given match conditions.int
size()
toString()
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.cyclops.cyclopscore.ingredient.collection.IIngredientCollection
containsAll, containsAll, parallelStream, spliterator, stream, toArray
Methods inherited from interface org.cyclops.cyclopscore.ingredient.collection.IIngredientCollectionLike
isEmpty
-
Constructor Details
-
IngredientCollectionEmpty
-
-
Method Details
-
getComponent
- Specified by:
getComponent
in interfaceIIngredientCollectionLike<T,
M, T> - Returns:
- The ingredient component type of which this collection contains instances.
-
size
public int size()- Specified by:
size
in interfaceIIngredientCollectionLike<T,
M, T> - Returns:
- The number of instances contained in this collection.
-
contains
Description copied from interface:IIngredientCollection
Check if this collection contains the given instance. This instance will be compared based on the matcher from the ingredient component type.- Specified by:
contains
in interfaceIIngredientCollection<T,
M> - Parameters:
instance
- An instance.- Returns:
- If this collection contains the given instance.
-
contains
Description copied from interface:IIngredientCollection
Check if this collection contains the given instance under the given match conditions. This instance will be compared based on the matcher from the ingredient component type using the given match condition.- Specified by:
contains
in interfaceIIngredientCollection<T,
M> - Parameters:
instance
- An instance.matchCondition
- A match condition.- Returns:
- If this collection contains the given instance under the given match conditions.
-
count
Description copied from interface:IIngredientCollection
Count the number of occurrences of the given instance under the given match conditions. This instance will be compared based on the matcher from the ingredient component type using the given match condition.- Specified by:
count
in interfaceIIngredientCollection<T,
M> - Parameters:
instance
- An instance.matchCondition
- A match condition.- Returns:
- The number of occurrences of the given instance under the given match conditions.
-
iterator
Description copied from interface:IIngredientCollection
An iterator over this collection over all occurrences of the given instance under the given match conditions.- Specified by:
iterator
in interfaceIIngredientCollection<T,
M> - Specified by:
iterator
in interfaceIIngredientCollectionLike<T,
M, T> - 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.
-
iterator
-
equals
Description copied from interface:IIngredientCollectionLike
Check if this collection equals the given object. -
hashCode
public int hashCode() -
toString
-