Class ItemStackComparators
- java.lang.Object
-
- org.spongepowered.api.item.inventory.ItemStackComparators
-
public final class ItemStackComparators extends java.lang.Object
A utility class for getting all availableComparator
s forItemStack
s.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
ItemStackComparators.Factory
-
Field Summary
Fields Modifier and Type Field Description static java.util.function.Supplier<java.util.Comparator<ItemStack>>
ALL
static java.util.function.Supplier<java.util.Comparator<ItemStack>>
DEFAULT
The default comparator forItemStack
s.static java.util.function.Supplier<java.util.Comparator<ItemStack>>
IGNORE_SIZE
Compares ItemStacks only ignoring their stack-size.static java.util.function.Supplier<java.util.Comparator<ItemStack>>
ITEM_DATA
Compares ItemStacks based on theirValue
s.static java.util.function.Supplier<java.util.Comparator<ItemStack>>
ITEM_DATA_IGNORE_DURABILITY
Compares ItemStacks based on theirValue
s ignoringKeys.ITEM_DURABILITY
.static java.util.function.Supplier<java.util.Comparator<ItemStack>>
SIZE
Compares ItemStacks based onItemStack
size.static java.util.function.Supplier<java.util.Comparator<ItemStack>>
TYPE
Compares ItemStacks based onItemType
.static java.util.function.Supplier<java.util.Comparator<ItemStack>>
TYPE_SIZE
-
-
-
Field Detail
-
TYPE
public static final java.util.function.Supplier<java.util.Comparator<ItemStack>> TYPE
Compares ItemStacks based onItemType
. This comparator will not return the same results as ItemStack.equals(ItemStack) for ItemStacks with extra attached data, different damage values, or different sizes.
-
SIZE
public static final java.util.function.Supplier<java.util.Comparator<ItemStack>> SIZE
Compares ItemStacks based onItemStack
size. This comparator will not return the same results as ItemStack.equals(ItemStack) for ItemStacks with extra attached data, different types, or different damage values.
-
TYPE_SIZE
public static final java.util.function.Supplier<java.util.Comparator<ItemStack>> TYPE_SIZE
-
DEFAULT
public static final java.util.function.Supplier<java.util.Comparator<ItemStack>> DEFAULT
The default comparator forItemStack
s.
-
ITEM_DATA
public static final java.util.function.Supplier<java.util.Comparator<ItemStack>> ITEM_DATA
Compares ItemStacks based on theirValue
s.
-
ITEM_DATA_IGNORE_DURABILITY
public static final java.util.function.Supplier<java.util.Comparator<ItemStack>> ITEM_DATA_IGNORE_DURABILITY
Compares ItemStacks based on theirValue
s ignoringKeys.ITEM_DURABILITY
.
-
IGNORE_SIZE
public static final java.util.function.Supplier<java.util.Comparator<ItemStack>> IGNORE_SIZE
Compares ItemStacks only ignoring their stack-size.This means for stackable items that they can stack together
-
ALL
public static final java.util.function.Supplier<java.util.Comparator<ItemStack>> ALL
-
-