Package generic
Class End.EndDomain<N,S extends End.EndSpan<N,S>>
java.lang.Object
generic.End.EndDomain<N,S>
- Type Parameters:
N- the type of valuesS- the type of spans
- All Implemented Interfaces:
Span.Domain<End<N>,S>
- Direct Known Subclasses:
FieldSpan.Domain
public abstract static class End.EndDomain<N,S extends End.EndSpan<N,S>>
extends Object
implements Span.Domain<End<N>,S>
-
Constructor Summary
ConstructorsConstructorDescriptionEndDomain(Comparator<N> comparator) Construct a domain using the given comparator -
Method Summary
-
Constructor Details
-
EndDomain
Construct a domain using the given comparator- Parameters:
comparator- the comparator for values
-
-
Method Details
-
toMinString
Description copied from interface:Span.DomainRender the lower bound of a span- Specified by:
toMinStringin interfaceSpan.Domain<N,S extends End.EndSpan<N, S>> - Parameters:
min- the lower boundnToString- a function to convert n to a string- Returns:
- the string
-
toMaxString
Description copied from interface:Span.DomainRender the upper bound of a span- Specified by:
toMaxStringin interfaceSpan.Domain<N,S extends End.EndSpan<N, S>> - Parameters:
max- the upper boundnToString- a function to convert n to a string- Returns:
- the string
-
compare
Description copied from interface:Span.DomainCompare two values- Specified by:
comparein interfaceSpan.Domain<N,S extends End.EndSpan<N, S>> - Parameters:
n1- a valuen2- another value- Returns:
- the result, as in
Comparator.compare(Object, Object)
-
min
Description copied from interface:Span.DomainGet the minimum value in the domainThis value can also represent negative infinity.
- Specified by:
minin interfaceSpan.Domain<N,S extends End.EndSpan<N, S>> - Returns:
- the minimum value
-
max
Description copied from interface:Span.DomainGet the maximum value in the domainThis value can also represent positive infinity.
- Specified by:
maxin interfaceSpan.Domain<N,S extends End.EndSpan<N, S>> - Returns:
- the maximum value
-
inc
Description copied from interface:Span.DomainGet a given value, incremented by 1If the resulting value would exceed
Span.Domain.max(), this should wrap toSpan.Domain.min().- Specified by:
incin interfaceSpan.Domain<N,S extends End.EndSpan<N, S>> - Parameters:
n- the value- Returns:
- the value incremented
-
dec
Description copied from interface:Span.DomainGet a given value, decremented by 1If the resulting value would exceed
Span.Domain.min(), this should wrap toSpan.Domain.max().- Specified by:
decin interfaceSpan.Domain<N,S extends End.EndSpan<N, S>> - Parameters:
n- the value- Returns:
- the value decremented
-