Send bugs or comments to Bernd Kühl (bernd@informatik.uni-osnabrueck.de)

lolo.scans
Class XMLStartOfElement

java.lang.Object
  |
  +--lolo.Scan
        |
        +--lolo.scans.Scan
              |
              +--lolo.scans.Word
                    |
                    +--lolo.scans.XMLStartOfElement
All Implemented Interfaces:
java.io.Serializable

public class XMLStartOfElement
extends Word

A recognizer to scan for <aElementName.

Author:
Bernd Kühl (bernd@informatik.uni-osnabrueck.de)
See Also:
Serialized Form

Inner classes inherited from class lolo.Scan
Scan.Action, Scan.State
 
Field Summary
protected  boolean start
          To mark the start of a scan.
 
Fields inherited from class lolo.scans.Word
index, word
 
Fields inherited from class lolo.scans.Scan
reset, stateObject
 
Fields inherited from class lolo.Scan
action, ignore
 
Constructor Summary
XMLStartOfElement(java.lang.String elementName)
          Constructs a XMLStartOfElement to the start of the element elementName.
 
Method Summary
 boolean equals(java.lang.Object obj)
          Indicates whether some other object is "equal to" this one.
 int hashCode()
          Returns a hash code for the object.
 Scan.State nextChar(char ch)
          Called by a Scanner for every new character.
 void reset()
          Resets this instance.
 java.lang.String toString()
          Returns a string representation of the object.
 
Methods inherited from class lolo.Scan
action, getAction, getIgnore, setAction, setIgnore
 
Methods inherited from class java.lang.Object
, clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

start

protected boolean start
To mark the start of a scan.
Constructor Detail

XMLStartOfElement

public XMLStartOfElement(java.lang.String elementName)
                  throws java.lang.IllegalArgumentException
Constructs a XMLStartOfElement to the start of the element elementName.
Parameters:
elementName - the element name.
Throws:
java.lang.IllegalArgumentException - if elementName is null or contains no character.
Method Detail

reset

public void reset()
Description copied from class: Scan
Resets this instance.
Overrides:
reset in class Word

nextChar

public Scan.State nextChar(char ch)
Description copied from class: Scan
Called by a Scanner for every new character.
Overrides:
nextChar in class Word
Following copied from class: lolo.Scan
Returns:
a State object to signal whether more characters are wanted and whether a symbol is found.
See Also:
Scan.State, Scanner

toString

public java.lang.String toString()
Description copied from class: Word
Returns a string representation of the object.
Overrides:
toString in class Word
Following copied from class: lolo.scans.Word
Returns:
a string representation of the object.

hashCode

public int hashCode()
Returns a hash code for the object.
Overrides:
hashCode in class Word
Returns:
a hash code for the object.

equals

public boolean equals(java.lang.Object obj)
Indicates whether some other object is "equal to" this one.
Overrides:
equals in class Word
Returns:
true if the receiver and obj are from the same class and if the element names are the same, false otherwise.

Send bugs or comments to Bernd Kühl (bernd@informatik.uni-osnabrueck.de)