public class CRange<T extends Comparable<T>> extends Range<T> implements Comparable<CRange<T>>, Serializable, IRange<T>
Comparable.| Constructor and Description |
|---|
CRange(T from,
T to,
C converter)
constructor
|
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(CRange<T> o) |
boolean |
contains(IRange<T> another)
Check if this period includes another one.
|
boolean |
contains(T another)
checks, if given value is inside range
|
Number |
getDelta()
Calculates the span between from and to
|
boolean |
intersects(IRange<T> range)
Determines if a given period intersects the range.
|
boolean |
intersects(T from,
T to)
Another variant of intersection check (save range construction).
|
getFrom, getTo, setFrom, setPrimitiveMaxValues, setPrimitiveMinValues, setTo, toStringpublic int compareTo(CRange<T> o)
compareTo in interface Comparable<CRange<T extends Comparable<T>>>public Number getDelta()
public boolean contains(T another)
another - valuepublic boolean contains(IRange<T> another)
period - the period that is checked as includedpublic boolean intersects(IRange<T> range)
range - rangeCopyright © 2012–2022. All rights reserved.