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

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

Inner classes inherited from class lolo.Scan
Scan.Action, Scan.State
 
Fields inherited from class lolo.scans.Scan
reset, stateObject
 
Fields inherited from class lolo.Scan
action, ignore
 
Constructor Summary
SimpleWhitespace()
           
 
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 lolo.scans.Scan
equals, hashCode, toString
 
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
 

Constructor Detail

SimpleWhitespace

public SimpleWhitespace()
Method Detail

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

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