|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectfc.util.Range
fc.util.CharRange
public class CharRange
A range of characters.
Note, many methods in this particular class have the same signatures as in the apache commons.lang package but the implementation was strictly clean-room.
Thread Safety: This class is not thread safe in the face of any concurrent modification (via changing the start/end chars or union/intersection operations).
Constructor Summary | |
---|---|
CharRange(char start,
char end)
Constructs a character range between the specified start and end chars (both inclusive). |
Method Summary | |
---|---|
char |
getEnd()
Get the end character for this character range. |
char |
getStart()
Get the start character for this character range |
boolean |
inRange(char c)
Is the passed in character inside this range |
static void |
main(java.lang.String[] args)
|
void |
setEnd(char c)
Sets the end character for this character range |
void |
setStart(char c)
Set the start character for this character range |
java.lang.String |
toString()
Output a string representation of the character range |
Methods inherited from class fc.util.Range |
---|
isNegated, setNegated |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public CharRange(char start, char end)
java.lang.IllegalArgumentException
- if the end char is lesser (via a < comparison)
than the start char (equal to the start char is ok)Method Detail |
---|
public char getStart()
public char getEnd()
public boolean inRange(char c)
public void setEnd(char c)
c
- the end char
java.lang.IllegalArgumentException
- if the end char is lesser (via a < comparison)
than the current start char (equal to the start char is
ok)public void setStart(char c)
java.lang.IllegalArgumentException
- if the start char is greater (via a > comparison)
than the current end char (equal to the end char is
ok)public java.lang.String toString()
toString
in class java.lang.Object
public static void main(java.lang.String[] args)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |