public class DefaultValueSegment<T extends java.lang.Comparable,V extends java.lang.Comparable> extends java.lang.Object implements ValueSegment<T,V>
ValueSegment interface.
Note:
DefaultValueSegments must be immutable objects. Callers are strongly
encouraged to construct DefaultValueSegments with defensive copies
of the start, end, and value arguments if they are not themselves immutable.
| Constructor and Description |
|---|
DefaultValueSegment(T start,
T end,
V value)
Create a DefaultValueSegment indicating the
value exists
between the start and end on some continuum of
Comparable objects. |
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(ValueSegment<T,V> o)
DefaultValueSegments are compared by value, then by segment start,
then by segment end.
|
T |
getEnd()
Returns the value marking the end of this segment.
|
T |
getStart()
Returns the value marking the start of this segment.
|
V |
getValue()
Returns the value observed within this segment.
|
java.lang.String |
toString() |
public DefaultValueSegment(T start, T end, V value)
value exists
between the start and end on some continuum of
Comparable objects.start - the beginning of the segmentend - the end of the segmentvalue - the value observed between start and
endjava.lang.IllegalArgumentException - if start or
end is nullpublic T getStart()
getStart in interface ValueSegment<T extends java.lang.Comparable,V extends java.lang.Comparable>public T getEnd()
getEnd in interface ValueSegment<T extends java.lang.Comparable,V extends java.lang.Comparable>public V getValue()
getValue in interface ValueSegment<T extends java.lang.Comparable,V extends java.lang.Comparable>public int compareTo(ValueSegment<T,V> o)
compareTo in interface java.lang.Comparable<ValueSegment<T extends java.lang.Comparable,V extends java.lang.Comparable>>public java.lang.String toString()
toString in class java.lang.ObjectGlazed Lists, Copyright © 2003 publicobject.com, O'Dell Engineering.
Documentation build by mockbuild at 2017-07-26 15:03