Record Class GeyserTrimMaterialPredicate
java.lang.Object
java.lang.Record
org.geysermc.geyser.item.custom.impl.predicates.GeyserTrimMaterialPredicate
- All Implemented Interfaces:
Predicate<org.geysermc.geyser.api.predicate.context.item.ItemPredicateContext>,org.geysermc.geyser.api.predicate.item.TrimMaterialPredicate,org.geysermc.geyser.api.predicate.MinecraftPredicate<org.geysermc.geyser.api.predicate.context.item.ItemPredicateContext>
public record GeyserTrimMaterialPredicate(@NonNull org.geysermc.geyser.api.util.Identifier trimMaterial, boolean negated)
extends Record
implements org.geysermc.geyser.api.predicate.item.TrimMaterialPredicate
-
Constructor Summary
ConstructorsConstructorDescriptionGeyserTrimMaterialPredicate(@NonNull org.geysermc.geyser.api.util.Identifier trimMaterial, boolean negated) Creates an instance of aGeyserTrimMaterialPredicaterecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.@NonNull org.geysermc.geyser.api.predicate.MinecraftPredicate<org.geysermc.geyser.api.predicate.context.item.ItemPredicateContext>negate()booleannegated()Returns the value of thenegatedrecord component.booleantest(org.geysermc.geyser.api.predicate.context.item.ItemPredicateContext context) final StringtoString()Returns a string representation of this record class.@NonNull org.geysermc.geyser.api.util.IdentifierReturns the value of thetrimMaterialrecord component.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.geysermc.geyser.api.predicate.MinecraftPredicate
and, or
-
Constructor Details
-
GeyserTrimMaterialPredicate
public GeyserTrimMaterialPredicate(@NonNull org.geysermc.geyser.api.util.Identifier trimMaterial, boolean negated) Creates an instance of aGeyserTrimMaterialPredicaterecord class.- Parameters:
trimMaterial- the value for thetrimMaterialrecord componentnegated- the value for thenegatedrecord component
-
-
Method Details
-
test
public boolean test(org.geysermc.geyser.api.predicate.context.item.ItemPredicateContext context) -
negate
public @NonNull org.geysermc.geyser.api.predicate.MinecraftPredicate<org.geysermc.geyser.api.predicate.context.item.ItemPredicateContext> negate() -
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 '=='. -
trimMaterial
public @NonNull org.geysermc.geyser.api.util.Identifier trimMaterial()Returns the value of thetrimMaterialrecord component.- Specified by:
trimMaterialin interfaceorg.geysermc.geyser.api.predicate.item.TrimMaterialPredicate- Returns:
- the value of the
trimMaterialrecord component
-
negated
public boolean negated()Returns the value of thenegatedrecord component.- Specified by:
negatedin interfaceorg.geysermc.geyser.api.predicate.item.TrimMaterialPredicate- Returns:
- the value of the
negatedrecord component
-