Record Class GeyserRangeDispatchPredicate
java.lang.Object
java.lang.Record
org.geysermc.geyser.item.custom.impl.predicates.GeyserRangeDispatchPredicate
- All Implemented Interfaces:
Predicate<org.geysermc.geyser.api.predicate.context.item.ItemPredicateContext>,org.geysermc.geyser.api.predicate.item.RangeDispatchPredicate,org.geysermc.geyser.api.predicate.MinecraftPredicate<org.geysermc.geyser.api.predicate.context.item.ItemPredicateContext>
public record GeyserRangeDispatchPredicate(@NonNull GeyserRangeDispatchPredicate.GeyserRangeDispatchProperty rangeProperty, double threshold, @org.checkerframework.checker.index.qual.NonNegative int index, boolean normalized, boolean negated)
extends Record
implements org.geysermc.geyser.api.predicate.item.RangeDispatchPredicate
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumNested classes/interfaces inherited from interface org.geysermc.geyser.api.predicate.item.RangeDispatchPredicate
org.geysermc.geyser.api.predicate.item.RangeDispatchPredicate.Property -
Constructor Summary
ConstructorsConstructorDescriptionGeyserRangeDispatchPredicate(@NonNull GeyserRangeDispatchPredicate.GeyserRangeDispatchProperty rangeProperty, double threshold, @org.checkerframework.checker.index.qual.NonNegative int index, boolean normalized, boolean negated) Creates an instance of aGeyserRangeDispatchPredicaterecord class.GeyserRangeDispatchPredicate(GeyserRangeDispatchPredicate.GeyserRangeDispatchProperty property, double threshold) GeyserRangeDispatchPredicate(GeyserRangeDispatchPredicate.GeyserRangeDispatchProperty property, double threshold, boolean normalized) GeyserRangeDispatchPredicate(GeyserRangeDispatchPredicate.GeyserRangeDispatchProperty property, double threshold, int index) -
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.@org.checkerframework.checker.index.qual.NonNegative intindex()Returns the value of theindexrecord component.@NonNull org.geysermc.geyser.api.predicate.MinecraftPredicate<org.geysermc.geyser.api.predicate.context.item.ItemPredicateContext>negate()booleannegated()Returns the value of thenegatedrecord component.booleanReturns the value of thenormalizedrecord component.@NonNull org.geysermc.geyser.api.predicate.item.RangeDispatchPredicate.Propertyproperty()Returns the value of therangePropertyrecord component.booleantest(org.geysermc.geyser.api.predicate.context.item.ItemPredicateContext context) doubleReturns the value of thethresholdrecord component.final StringtoString()Returns a string representation of this record class.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
-
GeyserRangeDispatchPredicate
public GeyserRangeDispatchPredicate(@NonNull GeyserRangeDispatchPredicate.GeyserRangeDispatchProperty rangeProperty, double threshold, @org.checkerframework.checker.index.qual.NonNegative int index, boolean normalized, boolean negated) Creates an instance of aGeyserRangeDispatchPredicaterecord class.- Parameters:
rangeProperty- the value for therangePropertyrecord componentthreshold- the value for thethresholdrecord componentindex- the value for theindexrecord componentnormalized- the value for thenormalizedrecord componentnegated- the value for thenegatedrecord component
-
GeyserRangeDispatchPredicate
public GeyserRangeDispatchPredicate(GeyserRangeDispatchPredicate.GeyserRangeDispatchProperty property, double threshold, boolean normalized) -
GeyserRangeDispatchPredicate
public GeyserRangeDispatchPredicate(GeyserRangeDispatchPredicate.GeyserRangeDispatchProperty property, double threshold, int index) -
GeyserRangeDispatchPredicate
public GeyserRangeDispatchPredicate(GeyserRangeDispatchPredicate.GeyserRangeDispatchProperty property, double threshold)
-
-
Method Details
-
property
public @NonNull org.geysermc.geyser.api.predicate.item.RangeDispatchPredicate.Property property()- Specified by:
propertyin interfaceorg.geysermc.geyser.api.predicate.item.RangeDispatchPredicate
-
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 '=='. -
rangeProperty
Returns the value of therangePropertyrecord component.- Returns:
- the value of the
rangePropertyrecord component
-
threshold
public double threshold()Returns the value of thethresholdrecord component.- Specified by:
thresholdin interfaceorg.geysermc.geyser.api.predicate.item.RangeDispatchPredicate- Returns:
- the value of the
thresholdrecord component
-
index
public @org.checkerframework.checker.index.qual.NonNegative int index()Returns the value of theindexrecord component.- Specified by:
indexin interfaceorg.geysermc.geyser.api.predicate.item.RangeDispatchPredicate- Returns:
- the value of the
indexrecord component
-
normalized
public boolean normalized()Returns the value of thenormalizedrecord component.- Specified by:
normalizedin interfaceorg.geysermc.geyser.api.predicate.item.RangeDispatchPredicate- Returns:
- the value of the
normalizedrecord component
-
negated
public boolean negated()Returns the value of thenegatedrecord component.- Specified by:
negatedin interfaceorg.geysermc.geyser.api.predicate.item.RangeDispatchPredicate- Returns:
- the value of the
negatedrecord component
-