lolo.scans
Class SimpleWhitespace
java.lang.Object
|
+--lolo.Scan
|
+--lolo.scans.Scan
|
+--lolo.scans.SimpleWhitespace
- All Implemented Interfaces:
- java.io.Serializable
- Direct Known Subclasses:
- JavaWhitespace
- public class SimpleWhitespace
- extends Scan
Instances of this class scan for one or more characters from ASCII 0x00 - 0x20.
By default these symbols will be ignored.
- Author:
- Bernd Kühl
(bernd@informatik.uni-osnabrueck.de)
- See Also:
- Serialized Form
|
Method Summary |
(package private) void |
()
Sets ignore to true. |
protected boolean |
isWhitespace(char ch)
Returns whether ch is a whitespace character. |
Scan.State |
nextChar(char ch)
Called by a Scanner for every new character. |
void |
reset()
Resets this instance. |
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
SimpleWhitespace
public SimpleWhitespace()
void ()
- Sets ignore to true.
- Overrides:
in class java.lang.Object
- See Also:
Scan.ignore
reset
public void reset()
- Description copied from class:
Scan
- Resets this instance.
- Overrides:
reset in class Scan
isWhitespace
protected boolean isWhitespace(char ch)
- Returns whether ch is a whitespace character.
- Returns:
- whether ch is a whitespace character.
nextChar
public Scan.State nextChar(char ch)
- Description copied from class:
Scan
- Called by a Scanner for every new character.
- Overrides:
nextChar in class Scan
- 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