Package alexiil.mc.lib.attributes.item
Enum Class ItemStackCollections
- All Implemented Interfaces:
Serializable
,Comparable<ItemStackCollections>
,Constable
Utility methods for creating
Map
's and Set
's based on ItemStack
's.
Every set or map factory method will produce a set or map using STRATEGY_IGNORE_AMOUNT
or
COMPARATOR_IGNORE_AMOUNT
, rather than their exact versions.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Field Summary
Modifier and TypeFieldDescriptionstatic Comparator<net.minecraft.item.ItemStack>
AComparator
that comparesItemStack
's by their RegistryIdentifier
, thenItemStack.getTag()
, then amounts.static Comparator<net.minecraft.item.ItemStack>
static it.unimi.dsi.fastutil.Hash.Strategy<net.minecraft.item.ItemStack>
static it.unimi.dsi.fastutil.Hash.Strategy<net.minecraft.item.ItemStack>
-
Method Summary
Modifier and TypeMethodDescriptionstatic <V> it.unimi.dsi.fastutil.objects.Object2ObjectAVLTreeMap<net.minecraft.item.ItemStack,V>
static <V> it.unimi.dsi.fastutil.objects.Object2ObjectOpenCustomHashMap<net.minecraft.item.ItemStack,V>
hashMap()
static it.unimi.dsi.fastutil.objects.Object2IntAVLTreeMap<net.minecraft.item.ItemStack>
static it.unimi.dsi.fastutil.objects.Object2IntOpenCustomHashMap<net.minecraft.item.ItemStack>
static it.unimi.dsi.fastutil.objects.Object2IntLinkedOpenCustomHashMap<net.minecraft.item.ItemStack>
static it.unimi.dsi.fastutil.objects.Object2IntMap<net.minecraft.item.ItemStack>
intMap()
Creates aMap
that can mapItemStack
's to ints.static it.unimi.dsi.fastutil.objects.Object2IntRBTreeMap<net.minecraft.item.ItemStack>
static it.unimi.dsi.fastutil.objects.Object2IntSortedMap<net.minecraft.item.ItemStack>
Creates aSortedMap
that can mapItemStack
's to ints.static <V> it.unimi.dsi.fastutil.objects.Object2ObjectLinkedOpenCustomHashMap<net.minecraft.item.ItemStack,V>
static <V> Map<net.minecraft.item.ItemStack,V>
map()
Creates aMap
that can mapItemStack
's to objects.static it.unimi.dsi.fastutil.objects.ObjectOpenCustomHashSet<net.minecraft.item.ItemStack>
static it.unimi.dsi.fastutil.objects.ObjectLinkedOpenCustomHashSet<net.minecraft.item.ItemStack>
static <V> it.unimi.dsi.fastutil.objects.Object2ObjectRBTreeMap<net.minecraft.item.ItemStack,V>
static Set<net.minecraft.item.ItemStack>
set()
Creates a set that can storeItemStack
's.static it.unimi.dsi.fastutil.objects.ObjectAVLTreeSet<net.minecraft.item.ItemStack>
static <V> SortedMap<net.minecraft.item.ItemStack,V>
Creates aSortedMap
that can mapItemStack
's to objects.static it.unimi.dsi.fastutil.objects.ObjectRBTreeSet<net.minecraft.item.ItemStack>
static it.unimi.dsi.fastutil.objects.ObjectSortedSet<net.minecraft.item.ItemStack>
Creates a sorted set that can storeItemStack
's.static ItemStackCollections
Returns the enum constant of this class with the specified name.static ItemStackCollections[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Field Details
-
STRATEGY_EXACT
public static final it.unimi.dsi.fastutil.Hash.Strategy<net.minecraft.item.ItemStack> STRATEGY_EXACT -
STRATEGY_IGNORE_AMOUNT
public static final it.unimi.dsi.fastutil.Hash.Strategy<net.minecraft.item.ItemStack> STRATEGY_IGNORE_AMOUNT -
COMPARATOR_ID_EXACT
AComparator
that comparesItemStack
's by their RegistryIdentifier
, thenItemStack.getTag()
, then amounts. -
COMPARATOR_IGNORE_AMOUNT
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum class has no constant with the specified nameNullPointerException
- if the argument is null
-
set
Creates a set that can storeItemStack
's.The current implementation delegates to
openHashSet()
. -
sortedSet
public static it.unimi.dsi.fastutil.objects.ObjectSortedSet<net.minecraft.item.ItemStack> sortedSet()Creates a sorted set that can storeItemStack
's.The current implementation delegates to
sortedAvlTreeSet()
. -
openHashSet
public static it.unimi.dsi.fastutil.objects.ObjectOpenCustomHashSet<net.minecraft.item.ItemStack> openHashSet() -
openLinkedHashSet
public static it.unimi.dsi.fastutil.objects.ObjectLinkedOpenCustomHashSet<net.minecraft.item.ItemStack> openLinkedHashSet() -
sortedRbTreeSet
public static it.unimi.dsi.fastutil.objects.ObjectRBTreeSet<net.minecraft.item.ItemStack> sortedRbTreeSet() -
sortedAvlTreeSet
public static it.unimi.dsi.fastutil.objects.ObjectAVLTreeSet<net.minecraft.item.ItemStack> sortedAvlTreeSet() -
map
-
sortedMap
Creates aSortedMap
that can mapItemStack
's to objects.The current implementation delegates to
avlTreeMap()
. -
hashMap
public static <V> it.unimi.dsi.fastutil.objects.Object2ObjectOpenCustomHashMap<net.minecraft.item.ItemStack,V> hashMap() -
linkedHashMap
public static <V> it.unimi.dsi.fastutil.objects.Object2ObjectLinkedOpenCustomHashMap<net.minecraft.item.ItemStack,V> linkedHashMap() -
rbTreeMap
public static <V> it.unimi.dsi.fastutil.objects.Object2ObjectRBTreeMap<net.minecraft.item.ItemStack,V> rbTreeMap() -
avlTreeMap
public static <V> it.unimi.dsi.fastutil.objects.Object2ObjectAVLTreeMap<net.minecraft.item.ItemStack,V> avlTreeMap() -
intMap
public static it.unimi.dsi.fastutil.objects.Object2IntMap<net.minecraft.item.ItemStack> intMap()Creates aMap
that can mapItemStack
's to ints.The current implementation delegates to
intHashMap()
. -
intSortedMap
public static it.unimi.dsi.fastutil.objects.Object2IntSortedMap<net.minecraft.item.ItemStack> intSortedMap()Creates aSortedMap
that can mapItemStack
's to ints.The current implementation delegates to
intAvlTreeMap()
. -
intHashMap
public static it.unimi.dsi.fastutil.objects.Object2IntOpenCustomHashMap<net.minecraft.item.ItemStack> intHashMap() -
intLinkedHashMap
public static it.unimi.dsi.fastutil.objects.Object2IntLinkedOpenCustomHashMap<net.minecraft.item.ItemStack> intLinkedHashMap() -
intRbTreeMap
public static it.unimi.dsi.fastutil.objects.Object2IntRBTreeMap<net.minecraft.item.ItemStack> intRbTreeMap() -
intAvlTreeMap
public static it.unimi.dsi.fastutil.objects.Object2IntAVLTreeMap<net.minecraft.item.ItemStack> intAvlTreeMap()
-