Record Class DistanceTransform.Node
java.lang.Object
java.lang.Record
com.hypixel.hytale.server.worldgen.climate.util.DistanceTransform.Node
- Enclosing class:
DistanceTransform
-
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateNode(int index, double distance) Creates an instance of aNoderecord class. -
Method Summary
Modifier and TypeMethodDescriptiondoubledistance()Returns the value of thedistancerecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.intindex()Returns the value of theindexrecord component.static intfinal StringtoString()Returns a string representation of this record class.
-
Field Details
-
index
private final int indexThe field for theindexrecord component. -
distance
private final double distanceThe field for thedistancerecord component.
-
-
Constructor Details
-
Node
private Node(int index, double distance) Creates an instance of aNoderecord class.- Parameters:
index- the value for theindexrecord componentdistance- the value for thedistancerecord component
-
-
Method Details
-
sort
-
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. All components in this record class are compared with '=='. -
index
public int index()Returns the value of theindexrecord component.- Returns:
- the value of the
indexrecord component
-
distance
public double distance()Returns the value of thedistancerecord component.- Returns:
- the value of the
distancerecord component
-