|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.parboiled.support.Characters
public class Characters
An immutable, set-like aggregation of (relatively few) characters that allows for an inverted semantic ("all chars except these few").
Field Summary | |
---|---|
static Characters |
ALL
The Characters set including all character. |
static Characters |
NONE
The empty Characters set |
Method Summary | |
---|---|
Characters |
add(char c)
Adds the given character to the set. |
Characters |
add(Characters other)
Returns a new Characters object containing all the characters of this instance plus all characters of the given instance. |
static Characters |
allBut(char... chars)
Creates a new Characters instance containing all characters minus the given ones. |
static Characters |
allBut(char c)
Creates a new Characters instance containing all characters minus the given one. |
static Characters |
allBut(java.lang.String chars)
Creates a new Characters instance containing all characters minus the given ones. |
boolean |
contains(char c)
Determines whether this instance contains the given character. |
boolean |
equals(java.lang.Object o)
|
char[] |
getChars()
Returns the characters in this set, if it is additive. |
int |
hashCode()
|
boolean |
isSubtractive()
|
static Characters |
of(char... chars)
Creates a new Characters instance containing only the given chars. |
static Characters |
of(char c)
Creates a new Characters instance containing only the given char. |
static Characters |
of(java.lang.String chars)
Creates a new Characters instance containing only the given chars. |
Characters |
remove(char c)
Removes the given character from the set. |
Characters |
remove(Characters other)
Returns a new Characters object containing all the characters of this instance minus all characters of the given instance. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final Characters NONE
public static final Characters ALL
Method Detail |
---|
public boolean isSubtractive()
public char[] getChars()
public Characters add(char c)
c
- the character to add
public Characters remove(char c)
c
- the character to remove
public boolean contains(char c)
c
- the character to check for
public Characters add(Characters other)
other
- the other Characters to add
public Characters remove(Characters other)
other
- the other Characters to remove
public java.lang.String toString()
toString
in class java.lang.Object
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public static Characters of(char c)
c
- the char
public static Characters of(char... chars)
chars
- the chars
public static Characters of(java.lang.String chars)
chars
- the chars
public static Characters allBut(char c)
c
- the char to NOT include
public static Characters allBut(char... chars)
chars
- the chars to NOT include
public static Characters allBut(java.lang.String chars)
chars
- the chars to NOT include
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |