Record Class Range.RangePoint<T extends Comparable<T>>
java.lang.Object
java.lang.Record
eu.rarogsoftware.rarog.platform.core.common.Range.RangePoint<T>
- Enclosing class:
- Range<T extends Comparable<T>>
public static record Range.RangePoint<T extends Comparable<T>>(T extends Comparable<T> point, boolean inclusive)
extends Record
-
Constructor Summary
ConstructorsConstructorDescriptionRangePoint
(T point, boolean inclusive) Creates an instance of aRangePoint
record class. -
Method Summary
Modifier and TypeMethodDescriptionboolean
boolean
final boolean
Indicates whether some other object is "equal to" this one.(package private) static <U extends Comparable<U>>
Range.RangePoint<U>exclusive
(U point) final int
hashCode()
Returns a hash code value for this object.boolean
Returns the value of theinclusive
record component.(package private) static <U extends Comparable<U>>
Range.RangePoint<U>inclusive
(U point) point()
Returns the value of thepoint
record component.final String
toString()
Returns a string representation of this record class.
-
Constructor Details
-
RangePoint
Creates an instance of aRangePoint
record class.- Parameters:
point
- the value for thepoint
record componentinclusive
- the value for theinclusive
record component
-
-
Method Details
-
inclusive
-
exclusive
-
before
-
after
-
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 '=='. -
point
Returns the value of thepoint
record component.- Returns:
- the value of the
point
record component
-
inclusive
public boolean inclusive()Returns the value of theinclusive
record component.- Returns:
- the value of the
inclusive
record component
-