Method Summary |
|
public boolean | adjacentTo(LongRange range) Indicates whether this range is adjacent to a specified
range.
Parameters: range - the range with which to compare this range. |
public boolean | canMergeWith(LongRange range) Indicates whether this can be merged with a specified range.
Two ranges can be merged if a range of consecutive values
containing all values of both ranges exists.
Parameters: range - the range to merge with. |
public int | compareTo(Object obj) Compares this range with some object for order.
Parameters: obj - the object with which to compare this range. |
public boolean | contains(long v) Indicates whether a specified value is a member of this
range.
Parameters: v - the value to test for membership. |
public boolean | equals(Object obj) Indicates whether this range is equal to some object.
Parameters: obj - the object with which to compare this range. |
public long | first() Returns the first long value in this range. |
public int | hashCode() Returns a hash code value for this range. |
public int | intersectionLength(LongRange range) Returns the length of the intersection between this
range and a specified range.
Parameters: range - the range with which to intersect this rance. |
public boolean | intersects(LongRange range) Indicates whether this range intersects a specified range.
Parameters: range - the range with which to compare this range. |
public long | last() Returns the last long value in this range. |
public int | length() Returns the number of values in this range. |
public LongRange | mergeWith(LongRange range) Creates a new range as a merge between this range and a
specified range. |
public String | toString() Returns a string representation of this range. |
public LongRange | tryMergeWith(LongRange range) |