Package net.lukemcomber.genetics.model
Record Class SpatialRangeCoordinates
java.lang.Object
java.lang.Record
net.lukemcomber.genetics.model.SpatialRangeCoordinates
-
Constructor Summary
ConstructorsConstructorDescriptionSpatialRangeCoordinates
(org.apache.commons.lang3.Range<Integer> xRange, org.apache.commons.lang3.Range<Integer> yRange, org.apache.commons.lang3.Range<Integer> zRange) Creates an instance of aSpatialRangeCoordinates
record class. -
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.toString()
Returns a string representation of the coordinatesorg.apache.commons.lang3.Range
<Integer> xRange()
Returns the value of thexRange
record component.org.apache.commons.lang3.Range
<Integer> yRange()
Returns the value of theyRange
record component.org.apache.commons.lang3.Range
<Integer> zRange()
Returns the value of thezRange
record component.
-
Constructor Details
-
SpatialRangeCoordinates
public SpatialRangeCoordinates(org.apache.commons.lang3.Range<Integer> xRange, org.apache.commons.lang3.Range<Integer> yRange, org.apache.commons.lang3.Range<Integer> zRange) Creates an instance of aSpatialRangeCoordinates
record class.- Parameters:
xRange
- the value for thexRange
record componentyRange
- the value for theyRange
record componentzRange
- the value for thezRange
record component
-
-
Method Details
-
toString
Returns a string representation of the coordinates -
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 withObjects::equals(Object,Object)
. -
xRange
Returns the value of thexRange
record component.- Returns:
- the value of the
xRange
record component
-
yRange
Returns the value of theyRange
record component.- Returns:
- the value of the
yRange
record component
-
zRange
Returns the value of thezRange
record component.- Returns:
- the value of the
zRange
record component
-