org.egothor.parser.filter
Class StopFilter

java.lang.Object
  extended by org.egothor.core.Filter
      extended by org.egothor.parser.filter.StopFilter
All Implemented Interfaces:
Sequence<Token>

public abstract class StopFilter
extends Filter

This abstract class should be extended by any class wishing to ignore certain tokens while processing all tokens.

Author:
Peter Halacsy, Leo Galambos

Field Summary
 
Fields inherited from class org.egothor.core.Filter
prev
 
Constructor Summary
StopFilter(Sequence<Token> arg0)
          Constructor for the StopFilter object.
 
Method Summary
abstract  boolean isStoppedToken(Token t)
          Test whether a token should be processed or ignored.
 Token next()
          Return the next token.
 
Methods inherited from class org.egothor.core.Filter
action, getPrevTokenizer, setPrevTokenizer
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StopFilter

public StopFilter(Sequence<Token> arg0)
Constructor for the StopFilter object. Calling this constructor merely instantiates an object of the superclass.

Parameters:
arg0 - Description of the Parameter
Method Detail

isStoppedToken

public abstract boolean isStoppedToken(Token t)
Test whether a token should be processed or ignored.

Parameters:
t - the Token to check
Returns:
true if valid, false if not

next

public Token next()
Return the next token.

Specified by:
next in interface Sequence<Token>
Overrides:
next in class Filter
Returns:
the next token
See Also:
org.egothor.core.Tokenizer#next()