Record Class ClassifyFilterItem.FilterSettings
java.lang.Object
java.lang.Record
me.desht.pneumaticcraft.common.item.ClassifyFilterItem.FilterSettings
- All Implemented Interfaces:
Predicate<net.minecraft.world.item.ItemStack>
- Enclosing class:
- ClassifyFilterItem
public static record ClassifyFilterItem.FilterSettings(boolean matchAll, Collection<ClassifyFilterItem.FilterCondition> filterConditions)
extends Record
implements Predicate<net.minecraft.world.item.ItemStack>
-
Constructor Summary
ConstructorsConstructorDescriptionFilterSettings(boolean matchAll, Collection<ClassifyFilterItem.FilterCondition> filterConditions) Creates an instance of aFilterSettingsrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.Returns the value of thefilterConditionsrecord component.fromStack(net.minecraft.world.item.ItemStack filterStack) final inthashCode()Returns a hash code value for this object.booleanmatchAll()Returns the value of thematchAllrecord component.voidsave(net.minecraft.world.item.ItemStack stack) booleantest(net.minecraft.world.item.ItemStack stack) final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
FilterSettings
public FilterSettings(boolean matchAll, Collection<ClassifyFilterItem.FilterCondition> filterConditions) Creates an instance of aFilterSettingsrecord class.- Parameters:
matchAll- the value for thematchAllrecord componentfilterConditions- the value for thefilterConditionsrecord component
-
-
Method Details
-
fromStack
public static ClassifyFilterItem.FilterSettings fromStack(net.minecraft.world.item.ItemStack filterStack) -
save
public void save(net.minecraft.world.item.ItemStack stack) -
test
public boolean test(net.minecraft.world.item.ItemStack stack) -
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
matchAll
public boolean matchAll()Returns the value of thematchAllrecord component.- Returns:
- the value of the
matchAllrecord component
-
filterConditions
Returns the value of thefilterConditionsrecord component.- Returns:
- the value of the
filterConditionsrecord component
-