net.sf.doolin.util.expression
Interface Token

All Known Implementing Classes:
AbstractToken, KeyToken, SequenceToken, TextToken, TokenList, ValueToken

public interface Token

Token definition in an expression.

Author:
Damien Coraboeuf

Method Summary
 void add(Token add)
          Adds the.
 Token addText(char c)
          Adds the text.
 void close()
          Close.
 Object evaluate(Locale locale, Object context)
          Evaluate.
 net.sf.doolin.util.expression.TokenType getType()
          Gets the type.
 boolean isClosed()
          Checks if is closed.
 boolean isVariable()
          Checks if the expression contains parts which can vary according to the model.
 boolean supportAdd()
          Support add.
 void visitTokensWith(TokenVisitor visitor)
          Visits a the whole token tree with a visitor.
 

Method Detail

add

void add(Token add)
Adds the.

Parameters:
add - the add

addText

Token addText(char c)
Adds the text.

Parameters:
c - the c
Returns:
the token

close

void close()
Close.


evaluate

Object evaluate(Locale locale,
                Object context)
Evaluate.

Parameters:
locale - Locale used for the evaluation
context - Context for the evaluation
Returns:
Result of the evaluation

getType

net.sf.doolin.util.expression.TokenType getType()
Gets the type.

Returns:
the type

isClosed

boolean isClosed()
Checks if is closed.

Returns:
true, if is closed

isVariable

boolean isVariable()
Checks if the expression contains parts which can vary according to the model.

Returns:
true if some parts of the expression are dependent on the model.

supportAdd

boolean supportAdd()
Support add.

Returns:
true, if successful

visitTokensWith

void visitTokensWith(TokenVisitor visitor)
Visits a the whole token tree with a visitor.

Parameters:
visitor - Visitor to apply for this token and each token underneath.


Copyright © 2011. All Rights Reserved.