Package generic
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 generic.End
End.EndDomain<N,S extends End.EndSpan<N, S>>, End.EndSpan<N, S extends 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
- Specified by:
toMinStringin interfaceEnd<T>- Parameters:
nToString- the endpoint-to-string function- Returns:
- the string
- See Also:
-
toMaxString
- Specified by:
toMaxStringin interfaceEnd<T>- Parameters:
nToString- the endpoint-to-string function- Returns:
- the string
- See Also:
-
inc
Description copied from interface:EndIncrement this endpoint, only by changing the coefficient of epsilon -
dec
Description copied from interface:EndDecrement this endpoint, only by changing the coefficient of epsilon -
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
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 withObjects::equals(Object,Object). -
val
Returns the value of thevalrecord component.- Returns:
- the value of the
valrecord component
-
epsilon
Returns the value of theepsilonrecord component.- Returns:
- the value of the
epsilonrecord component
-