xtc.parser
Class CharCase

java.lang.Object
  extended by xtc.tree.Node
      extended by xtc.parser.CharCase
All Implemented Interfaces:
java.lang.Iterable<java.lang.Object>, Locatable

public class CharCase
extends Node

A case within a character switch.

Version:
$Revision: 1.5 $
Author:
Robert Grimm
See Also:
CharSwitch

Field Summary
 Element element
          The optional element.
 CharClass klass
          The characters as a character class.
 
Constructor Summary
CharCase(CharClass klass)
          Create a new character case.
CharCase(CharClass klass, Element element)
          Create a new character case.
CharCase(char c, Element element)
          Create a new character case.
 
Method Summary
 boolean equals(java.lang.Object o)
           
 int hashCode()
           
 
Methods inherited from class xtc.tree.Node
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, write
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

klass

public CharClass klass
The characters as a character class. Note that the character class must not be exclusive and should be normalized.


element

public Element element
The optional element. A null element indicates that this character case's characters do not provide a match.

Constructor Detail

CharCase

public CharCase(CharClass klass)
Create a new character case.

Parameters:
klass - The character class.

CharCase

public CharCase(char c,
                Element element)
Create a new character case.

Parameters:
c - The character.
element - The element.

CharCase

public CharCase(CharClass klass,
                Element element)
Create a new character case.

Parameters:
klass - The character class.
element - The element.
Method Detail

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

equals

public boolean equals(java.lang.Object o)
Overrides:
equals in class java.lang.Object


Copyright © 2012. All Rights Reserved.