public final class Range<C extends Comparable> extends Object
| Modifier and Type | Method and Description | 
|---|---|
| boolean | contains(C value)Tests whether the specified value is contained within this range. | 
| static <C extends Comparable>  | emptyRange()Returns an empty range. | 
| boolean | equals(Object o) | 
| C | getEnd()Returns the end of the range. | 
| C | getStart()Returns the start of the range. | 
| int | hashCode() | 
| Range<C> | intersect(Range<C> otherRange)Computes the intersection of the this range with another range
 and returns the result in a new Range. | 
| boolean | isEmpty()Tests whether this range is empty. | 
| static <C extends Comparable>  | of(C start,
  C end)Returns a new range consisting of the specified start and end points. | 
| String | toString() | 
public static <C extends Comparable> Range<C> of(C start, C end)
IllegalArgumentException - if start or end is nullpublic static <C extends Comparable> Range<C> emptyRange()
public C getStart()
public C getEnd()
public boolean isEmpty()
public boolean contains(C value)
value - the value to testpublic Range<C> intersect(Range<C> otherRange)
otherRange - the (non-null) range to intersect/updateCopyright © 2001-2017 The Apache Software Foundation. All Rights Reserved.