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
|
Field Summary |
protected boolean |
start
To mark the start of a scan. |
|
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 java.lang.Object |
, clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
start
protected boolean start
- To mark the start of a scan.
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.
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.