|
Bali Share 1.1.18 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--oracle.bali.share.collection.Range
A class that encapsulates a lower and upper limit
Constructor Summary | |
Range(int lowerLimit,
int upperLimit)
Constructs a Range object with the specified upper and lower limits. |
Method Summary | |
static Range[] |
addRanges(Range[] a,
Range[] b)
Utility method for adding ranges. |
java.lang.Object |
clone()
Support for cloning. |
int |
getLowerLimit()
Returns the lower limit of the range |
int |
getUpperLimit()
Returns the upper limit of the range |
boolean |
inRange(int value)
Checks whether the value is inside the range |
static boolean |
rangesContain(Range[] ranges,
int value)
|
static boolean |
rangesContain(Range[] a,
Range[] b)
Returns true if the set of ranges a completely encompases the set of ranges b. |
static Range[] |
subtractRanges(Range[] a,
Range[] b)
Utility method for subtracting ranges, such that the result is a duplicate of 'a', with the removal of any areas intersected by 'b'. |
java.lang.String |
toString()
Returns the String representation of the Range values. |
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public Range(int lowerLimit, int upperLimit)
lower
- lower limit of the Range.upper
- upper limit of the Range.Method Detail |
public java.lang.Object clone() throws java.lang.CloneNotSupportedException
clone
in class java.lang.Object
public int getLowerLimit()
public int getUpperLimit()
public boolean inRange(int value)
value
- the value to checkpublic java.lang.String toString()
toString
in class java.lang.Object
public static Range[] addRanges(Range[] a, Range[] b)
public static Range[] subtractRanges(Range[] a, Range[] b)
public static boolean rangesContain(Range[] ranges, int value)
public static boolean rangesContain(Range[] a, Range[] b)
|
Bali Share 1.1.18 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |