public class CharSet extends Object implements Cloneable, Serializable
Modifier and Type | Class and Description |
---|---|
protected static class |
CharSet.CharRange |
Modifier and Type | Field and Description |
---|---|
static CharSet |
EMPTY_SET |
static char |
HI
Highest possible character value, currently
0xffffffff ,
needed for the definition of negate() . |
protected List<CharSet.CharRange> |
list |
static char |
LOW
Lowest possible character value, currently
0x0000 ,
needed for the definition of negate() . |
Constructor and Description |
---|
CharSet() |
CharSet(char l) |
CharSet(char l,
char u)
Creates a
CharSet containing the range from l to u . |
CharSet(String s)
Creates a
CharSet containing the all characters contained in the
string argument. |
Modifier and Type | Method and Description |
---|---|
boolean |
contains(char c) |
CharSet |
cut(CharSet cs2) |
CharSet |
join(CharSet cs2) |
static CharSet |
makeCharSet(String chars)
Returns a
CharSet containing the all characters contained in the
string argument. |
CharSet |
negate() |
Character |
singletonContents() |
static String |
staticStringRepD2d(CharSet cs) |
String |
stringRep() |
String |
stringRepD2d() |
protected static String |
xn(char c) |
public static final char LOW
0x0000
,
needed for the definition of negate()
.public static final char HI
0xffffffff
,
needed for the definition of negate()
.protected List<CharSet.CharRange> list
public static final CharSet EMPTY_SET
public CharSet()
public CharSet(char l, char u)
CharSet
containing the range from l
to u
.IllegalArgumentException
- in case l is nuermically larger than u.public CharSet(char l)
public CharSet(String s)
CharSet
containing the all characters contained in the
string argument.public static CharSet makeCharSet(String chars)
CharSet
containing the all characters contained in the
string argument.public boolean contains(char c)
public Character singletonContents()
this
, if it is a singleton set,
otherwise null
.public CharSet negate()
protected static String xn(char c)
public String stringRep()
public String stringRepD2d()
D2d
module syntax.see also the complete user documentation .