Record Class End.Point<T>
java.lang.Object
java.lang.Record
generic.End.Point<T>
- Type Parameters:
T- the type of values- Record Components:
val- the value of the endpointepsilon- determines whether the endpoint is included
- All Implemented Interfaces:
End<T>
An endpoint representing a bound
-
Nested Class Summary
Nested classes/interfaces inherited from interface End
End.EndDomain<N,S>, End.EndSpan<N, S>, End.Epsilon, End.Point<T>, End.Unbound -
Constructor Summary
ConstructorsConstructorDescriptionPoint(T val, End.Epsilon epsilon) Creates an instance of aPointrecord class. -
Method Summary
Modifier and TypeMethodDescriptionintcompareTo(End<T> that, Comparator<T> comparator) Compare two endpointsdec()Decrement this endpoint, only by changing the coefficient of epsilonepsilon()Returns the value of theepsilonrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.inc()Increment this endpoint, only by changing the coefficient of epsilonbooleanCheck if this endpoint includes its valuebooleanCheck if this endpoint is allowed as an upper endpointbooleanCheck if this endpoint is allowed as a lower endpointtoMaxString(Function<? super End<T>, String> nToString) toMinString(Function<? super End<T>, String> nToString) final StringtoString()Returns a string representation of this record class.val()Returns the value of thevalrecord component.
-
Constructor Details
-
Method Details
-
toMinString
-
toMaxString
-
inc
-
dec
-
isValidMin
public boolean isValidMin()Description copied from interface:EndCheck if this endpoint is allowed as a lower endpoint- Specified by:
isValidMinin interfaceEnd<T>- Returns:
- true if allowed
-
isValidMax
public boolean isValidMax()Description copied from interface:EndCheck if this endpoint is allowed as an upper endpoint- Specified by:
isValidMaxin interfaceEnd<T>- Returns:
- true if allowed
-
isInclusive
public boolean isInclusive()Description copied from interface:EndCheck if this endpoint includes its value- Specified by:
isInclusivein interfaceEnd<T>- Returns:
- true if included
-
compareTo
Description copied from interface:EndCompare two endpointsFirst, the values of infinity are considered. Then, the values of the endpoints are considered. Finally, the coefficients of epsilon are considered.
- Specified by:
compareToin interfaceEnd<T>- Parameters:
that- the other endpointcomparator- the value comparator- Returns:
- the result as in
Comparator.compare(Object, Object)
-
toString
-
hashCode
-
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). -
val
-
epsilon
-