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
  • 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 a GeyserRangeDispatchPredicate record class.
      Parameters:
      rangeProperty - the value for the rangeProperty record component
      threshold - the value for the threshold record component
      index - the value for the index record component
      normalized - the value for the normalized record component
      negated - the value for the negated record 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:
      property in interface org.geysermc.geyser.api.predicate.item.RangeDispatchPredicate
    • test

      public boolean test(org.geysermc.geyser.api.predicate.context.item.ItemPredicateContext context)
      Specified by:
      test in interface Predicate<org.geysermc.geyser.api.predicate.context.item.ItemPredicateContext>
    • negate

      public @NonNull org.geysermc.geyser.api.predicate.MinecraftPredicate<org.geysermc.geyser.api.predicate.context.item.ItemPredicateContext> negate()
      Specified by:
      negate in interface org.geysermc.geyser.api.predicate.MinecraftPredicate<org.geysermc.geyser.api.predicate.context.item.ItemPredicateContext>
      Specified by:
      negate in interface Predicate<org.geysermc.geyser.api.predicate.context.item.ItemPredicateContext>
    • toString

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 with Objects::equals(Object,Object); primitive components are compared with '=='.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • rangeProperty

      Returns the value of the rangeProperty record component.
      Returns:
      the value of the rangeProperty record component
    • threshold

      public double threshold()
      Returns the value of the threshold record component.
      Specified by:
      threshold in interface org.geysermc.geyser.api.predicate.item.RangeDispatchPredicate
      Returns:
      the value of the threshold record component
    • index

      public @org.checkerframework.checker.index.qual.NonNegative int index()
      Returns the value of the index record component.
      Specified by:
      index in interface org.geysermc.geyser.api.predicate.item.RangeDispatchPredicate
      Returns:
      the value of the index record component
    • normalized

      public boolean normalized()
      Returns the value of the normalized record component.
      Specified by:
      normalized in interface org.geysermc.geyser.api.predicate.item.RangeDispatchPredicate
      Returns:
      the value of the normalized record component
    • negated

      public boolean negated()
      Returns the value of the negated record component.
      Specified by:
      negated in interface org.geysermc.geyser.api.predicate.item.RangeDispatchPredicate
      Returns:
      the value of the negated record component