Class ItemStackComparators
- java.lang.Object
-
- org.spongepowered.api.item.inventory.ItemStackComparators
-
public final class ItemStackComparators extends 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 Supplier<Comparator<ItemStack>>
ALL
static Supplier<Comparator<ItemStack>>
DEFAULT
The default comparator forItemStack
s.static Supplier<Comparator<ItemStack>>
IGNORE_SIZE
Compares ItemStacks only ignoring their stack-size.static Supplier<Comparator<ItemStack>>
ITEM_DATA
Compares ItemStacks based on theirValue
s.static Supplier<Comparator<ItemStack>>
ITEM_DATA_IGNORE_DURABILITY
Compares ItemStacks based on theirValue
s ignoringKeys.ITEM_DURABILITY
.static Supplier<Comparator<ItemStack>>
SIZE
Compares ItemStacks based onItemStack
size.static Supplier<Comparator<ItemStack>>
TYPE
Compares ItemStacks based onItemType
.static Supplier<Comparator<ItemStack>>
TYPE_SIZE
-
-
-
Field Detail
-
TYPE
public static final Supplier<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 Supplier<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 Supplier<Comparator<ItemStack>> TYPE_SIZE
-
DEFAULT
public static final Supplier<Comparator<ItemStack>> DEFAULT
The default comparator forItemStack
s.
-
ITEM_DATA
public static final Supplier<Comparator<ItemStack>> ITEM_DATA
Compares ItemStacks based on theirValue
s.
-
ITEM_DATA_IGNORE_DURABILITY
public static final Supplier<Comparator<ItemStack>> ITEM_DATA_IGNORE_DURABILITY
Compares ItemStacks based on theirValue
s ignoringKeys.ITEM_DURABILITY
.
-
IGNORE_SIZE
public static final Supplier<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 Supplier<Comparator<ItemStack>> ALL
-
-