| |
|
| java.lang.Object java.text.CharSet
CharSet | class CharSet implements Cloneable(Code) | | An object representing a set of characters. (This is a "set" in the
mathematical sense: an unduplicated list of characters on which set
operations such as union and intersection can be performed.) The
set information is stored in compressed, optimized form: The object
contains a String with an even number of characters. Each pair of
characters represents a range of characters contained in the set
(a pair of the same character represents a single character). The
characters are sorted in increasing order.
|
Constructor Summary | |
public | CharSet() Creates an empty CharSet. | public | CharSet(char c) Creates a CharSet containing a single character. | public | CharSet(char lo, char hi) Creates a CharSet containing a range of characters. |
CharSet | public CharSet()(Code) | | Creates an empty CharSet.
|
CharSet | public CharSet(char c)(Code) | | Creates a CharSet containing a single character.
Parameters: c - The character to put into the CharSet |
CharSet | public CharSet(char lo, char hi)(Code) | | Creates a CharSet containing a range of characters.
Parameters: lo - The lowest-numbered character to include in the range Parameters: hi - The highest-numbered character to include in the range |
clone | public Object clone()(Code) | | Creates a new CharSet that is equal to this one
|
complement | public CharSet complement()(Code) | | Returns a CharSet containing all the characters which are not
in "this"
|
contains | public boolean contains(char c)(Code) | | Returns true if this CharSet contains the specified character
Parameters: c - The character we're testing for set membership |
difference | public CharSet difference(CharSet that)(Code) | | Returns a CharSet containing all the characters in "this" that
aren't also in "that"
|
empty | public boolean empty()(Code) | | Returns true if this CharSet contains no characters
|
equals | public boolean equals(Object that)(Code) | | Returns true if "that" is another instance of CharSet containing
the exact same characters as this one
|
getChars | public Enumeration getChars()(Code) | | Returns an Enumeration that will return the ranges of characters
contained in this CharSet one at a time
|
getRanges | public String getRanges()(Code) | | Returns a String representing the contents of this CharSet
in the same form in which they're stored internally: as pairs
of characters representing the start and end points of ranges
|
intersection | public CharSet intersection(CharSet that)(Code) | | Returns the intersection of two CharSets.
|
releaseExpressionCache | public static Hashtable releaseExpressionCache()(Code) | | Returns a copy of CharSet's expression cache and sets CharSet's
expression cache to empty.
|
toString | public String toString()(Code) | | Returns a textual representation of this CharSet. If the result
of calling this function is passed to CharSet.parseString(), it
will produce another CharSet that is equal to this one.
|
union | public CharSet union(CharSet that)(Code) | | Returns a CharSet representing the union of two CharSets.
|
|
|
|