Class LeafBaseToken

java.lang.Object
com.tangosol.coherence.dsltools.base.BaseToken
com.tangosol.coherence.dsltools.base.LeafBaseToken
Direct Known Subclasses:
IdentifierBaseToken, LiteralBaseToken, OperatorBaseToken, PunctuationBaseToken

public abstract class LeafBaseToken extends BaseToken
LeafBaseToken is the abstract base class for all tokes processed by the low level BaseTokenScanner that are considered leaves.
Author:
djl 2009.03.14
  • Constructor Details

    • LeafBaseToken

      public LeafBaseToken()
  • Method Details

    • getValue

      public abstract String getValue()
      Return the string representation of this LeafBaseToken.
      Returns:
      the string that represents the reciever
    • isLeaf

      public boolean isLeaf()
      Answer whether this token is a leaf token.
      Specified by:
      isLeaf in class BaseToken
      Returns:
      the answer to the question "is this token a leaf?"
    • isCompound

      public boolean isCompound()
      Answer whether this token is a compound token.
      Specified by:
      isCompound in class BaseToken
      Returns:
      the answer to the question "is this token compound?"
    • match

      public boolean match(String s, boolean fIgnoreCase)
      Answer whether this token matches the given string.
      Specified by:
      match in class BaseToken
      Parameters:
      s - the String to match agains
      fIgnoreCase - the flag that controls if case matters
      Returns:
      the answer to the question "does this token match a given string?
    • toString

      public String toString()
      Return a human-readable description for this token.
      Overrides:
      toString in class Object
      Returns:
      a String description of the token