Class LeafBaseToken

    • Constructor Detail

      • LeafBaseToken

        public LeafBaseToken()
    • Method Detail

      • 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