Class WhiteSpaceToken


  • public class WhiteSpaceToken
    extends Token
    A token denoting a single whitespace character.
    • Constructor Summary

      Constructors 
      Constructor Description
      WhiteSpaceToken​(java.lang.String lexeme, int position)
      Create a token.
    • Constructor Detail

      • WhiteSpaceToken

        public WhiteSpaceToken​(java.lang.String lexeme,
                               int position)
        Create a token.
        Parameters:
        lexeme - the whitespace string
        position - position of the token within the string
    • Method Detail

      • equals

        public boolean equals​(java.lang.Object actual)
        Specified by:
        equals in class Token
        Parameters:
        actual - another token
        Returns:
        true iff actual is a WhiteSpaceToken and their lexemes match.
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
        Returns:
        hash code