|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.vgrs.xcode.common.Range
public class Range
This class stores the start and end integer values of a range of integers. It also provides methods to specify if a given integer value falls within the start and end range of integers stored in this class.
| Field Summary | |
|---|---|
int |
first
The integer value of the start of the range |
boolean |
isPoint
Boolean to indicate that start and end are the same value |
int |
last
The integer value of the end of the range |
| Constructor Summary | |
|---|---|
Range(int aFirst)
|
|
Range(int aFirst,
int aLast)
|
|
| Method Summary | |
|---|---|
int |
compareTo(Range aOtherRange)
Comparator to efficiently sort while storing this class in java.util.Collections. |
boolean |
has(int aPoint)
|
boolean |
hasAll(int[] aPoints)
Specifies if all the code points specified in the input array are present in the range of integers stored in this class. |
boolean |
hasAny(int[] aPoints)
Specifies if any of the int values specified in the input array are present in the range of integers stored in this class. |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public int first
public int last
public boolean isPoint
| Constructor Detail |
|---|
public Range(int aFirst,
int aLast)
aFirst - the start of the range of integersaLast - the end of the range of integerspublic Range(int aFirst)
aFirst - Start and end are the same| Method Detail |
|---|
public int compareTo(Range aOtherRange)
compareTo in interface java.lang.Comparable<Range>public boolean has(int aPoint)
aPoint - the int value to check if it is within the range of integers held in
this class.
public boolean hasAny(int[] aPoints)
aPoints - an array containing the int values to be tested
public boolean hasAll(int[] aPoints)
aPoints - an array containing the int values to be tested
public java.lang.String toString()
toString in class java.lang.Object
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||