Record Class NotNearAnyInHashGrid

java.lang.Object
java.lang.Record
com.hypixel.hytale.builtin.portals.utils.posqueries.predicates.NotNearAnyInHashGrid
Record Components:
hashGrid - The spatial hash grid to check against.
radius - The radius within which to check for points.
All Implemented Interfaces:
PositionPredicate

public record NotNearAnyInHashGrid(SpatialHashGrid<?> hashGrid, double radius) extends Record implements PositionPredicate
A position predicate that checks if there are no points within a certain radius in a spatial hash grid.
  • Constructor Summary

    Constructors
    Constructor
    Description
    NotNearAnyInHashGrid(SpatialHashGrid<?> hashGrid, double radius)
    Creates an instance of a NotNearAnyInHashGrid record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    final boolean
    Indicates whether some other object is "equal to" this one.
    final int
    Returns a hash code value for this object.
    Returns the value of the hashGrid record component.
    double
    Returns the value of the radius record component.
    boolean
    test(World world, org.joml.Vector3d point)
    Determines if the condition is met at the specified point in the given world.
    final String
    Returns a string representation of this record class.

    Methods inherited from class Object

    getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • NotNearAnyInHashGrid

      public NotNearAnyInHashGrid(SpatialHashGrid<?> hashGrid, double radius)
      Creates an instance of a NotNearAnyInHashGrid record class.
      Parameters:
      hashGrid - the value for the hashGrid record component
      radius - the value for the radius record component
  • Method Details

    • test

      public boolean test(@Nonnull World world, @Nonnull org.joml.Vector3d point)
      Description copied from interface: PositionPredicate
      Determines if the condition is met at the specified point in the given world.
      Specified by:
      test in interface PositionPredicate
      Parameters:
      world - The world to test the condition in.
      point - The point to test the condition at.
      Returns:
      true if the condition is met, false otherwise.
    • 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 the compare method from their corresponding wrapper classes.
      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.
    • hashGrid

      public SpatialHashGrid<?> hashGrid()
      Returns the value of the hashGrid record component.
      Returns:
      the value of the hashGrid record component
    • radius

      public double radius()
      Returns the value of the radius record component.
      Returns:
      the value of the radius record component