Class CompoundBaseToken
- java.lang.Object
-
- com.tangosol.coherence.dsltools.base.BaseToken
-
- com.tangosol.coherence.dsltools.base.CompoundBaseToken
-
- Direct Known Subclasses:
NestedBaseTokens
,SequenceBaseToken
public abstract class CompoundBaseToken extends BaseToken
CompoundBaseToken is the abstract base class for all tokens processed by the low level BaseTokenScanner that are made up of two or more BaseTokens.- Author:
- djl 2009.03.14
-
-
Constructor Summary
Constructors Constructor Description CompoundBaseToken()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description BaseToken
get(int index)
Return the BaseToken at the given indexabstract BaseToken[]
getTokens()
Return an array of BaseTokens making up the receiver.boolean
isCompound()
Answer whether this token is a compound token.boolean
isLeaf()
Answer whether this token is a leaf token.boolean
match(String s, boolean fIgnoreCaseFlag)
Answer whether this token matches the given string.int
size()
Return the size of the collection of BaseTokens making up the receiver.String
toString()
Return a human-readable description for this token.-
Methods inherited from class com.tangosol.coherence.dsltools.base.BaseToken
getSimpleName, isIdentifier, isLiteral, isNest, isOperator, isPunctuation, match
-
-
-
-
Method Detail
-
getTokens
public abstract BaseToken[] getTokens()
Return an array of BaseTokens making up the receiver.- Returns:
- the an array of BaseTokens making up the receiver.
-
size
public int size()
Return the size of the collection of BaseTokens making up the receiver.- Returns:
- the size of the BaseTocken collection making up the receiver
-
get
public BaseToken get(int index)
Return the BaseToken at the given index- Parameters:
index
- the zero base index for retreiving a BaseToken- Returns:
- the BaseToken at the given index
-
isLeaf
public boolean isLeaf()
Answer whether this token is a leaf token.
-
isCompound
public boolean isCompound()
Answer whether this token is a compound token.- Specified by:
isCompound
in classBaseToken
- Returns:
- the answer to the question "is this token compound?"
-
match
public boolean match(String s, boolean fIgnoreCaseFlag)
Answer whether this token matches the given string.
-
-