Class PunctuationBaseToken


  • public class PunctuationBaseToken
    extends LeafBaseToken
    PunctuationBaseToken is a token that represents a known punctuation.
    Author:
    djl 2009.03.14
    • Constructor Detail

      • PunctuationBaseToken

        public PunctuationBaseToken​(String s)
        Construct a new PunctuationBaseToken with the given punctuation value.
        Parameters:
        s - the string that represents a punctuation
    • Method Detail

      • getValue

        public String getValue()
        Return the string representation of this LeafBaseToken.
        Specified by:
        getValue in class LeafBaseToken
        Returns:
        the string that represents the reciever
      • isPunctuation

        public boolean isPunctuation()
        Description copied from class: BaseToken
        Answer whether this token represents a punctuation character.
        Overrides:
        isPunctuation in class BaseToken
        Returns:
        the answer to the question "is this token a punctuation character?"
      • toString

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