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 aRangePointrecord class. -
Method Summary
Modifier and TypeMethodDescriptionbooleanbooleanfinal booleanIndicates whether some other object is "equal to" this one.(package private) static <U extends Comparable<U>>
Range.RangePoint<U>exclusive(U point) final inthashCode()Returns a hash code value for this object.booleanReturns the value of theinclusiverecord component.(package private) static <U extends Comparable<U>>
Range.RangePoint<U>inclusive(U point) point()Returns the value of thepointrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
RangePoint
Creates an instance of aRangePointrecord class.- Parameters:
point- the value for thepointrecord componentinclusive- the value for theinclusiverecord 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 thepointrecord component.- Returns:
- the value of the
pointrecord component
-
inclusive
public boolean inclusive()Returns the value of theinclusiverecord component.- Returns:
- the value of the
inclusiverecord component
-