public class CharSwitch extends CharTerminal implements InternalElement
terminals.Element.Tag| Modifier and Type | Field and Description |
|---|---|
Element |
base
The optional default element.
|
java.util.List<CharCase> |
cases
The list of
character cases. |
| Constructor and Description |
|---|
CharSwitch(CharClass klass,
Element element)
Create a new character switch element which includes a case for
the specified character class and corresponding element.
|
CharSwitch(java.util.List<CharCase> cases)
Create a new character switch element.
|
CharSwitch(java.util.List<CharCase> cases,
Element base)
Create a new character switch element.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object o) |
CharCase |
hasCase(CharClass klass)
Determine whether this character switch has a character case for
the specified character class.
|
int |
hashCode() |
boolean |
overlaps(CharClass klass)
Determine whether this character switch has a character case that
overlaps the specified character class.
|
Element.Tag |
tag()
Get this element's tag.
|
add, add, addAll, addAll, addAll, addAll, addAllTo, addNode, contains, get, getBoolean, getBooleanProperty, getGeneric, getList, getLocation, getName, getNode, getProperty, getString, getStringProperty, getTokenText, hasLocation, hasName, hasProperty, hasTraversal, hasVariable, indexOf, isAnnotation, isEmpty, isGeneric, isList, isToken, iterator, lastIndexOf, properties, remove, removeProperty, set, setLocation, setLocation, setProperty, size, strip, toAnnotation, toList, toString, toToken, writepublic java.util.List<CharCase> cases
character cases.public Element base
public CharSwitch(java.util.List<CharCase> cases)
cases - The list of cases.public CharSwitch(java.util.List<CharCase> cases, Element base)
cases - The list of cases.base - The default element.public CharSwitch(CharClass klass, Element element)
klass - The character class.element - The corresponding element.public Element.Tag tag()
Elementpublic CharCase hasCase(CharClass klass)
klass - The character class.null if
this character switch does not have a case for the character
class.public boolean overlaps(CharClass klass)
klass - The character class.true if this character switch has an overlapping
character case.CharClass.overlaps(CharClass)public int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object o)
equals in class java.lang.ObjectCopyright © 2014. All Rights Reserved.