Package picasso.parser.tokens
Class IdentifierToken
- java.lang.Object
-
- picasso.parser.tokens.Token
-
- picasso.parser.tokens.IdentifierToken
-
public class IdentifierToken extends Token
Represents an identifier (a variable name)
-
-
Constructor Summary
Constructors Constructor Description IdentifierToken(String value)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object o)
String
getName()
Returns the identifier's nameint
getPrecedence()
boolean
isConstant()
Returns true if this token represents a constant, false otherwiseboolean
isFunction()
Returns true if this token represents a function, false otherwiseString
toString()
Represents the token by its description
-
-
-
Constructor Detail
-
IdentifierToken
public IdentifierToken(String value)
-
-
Method Detail
-
getName
public String getName()
Returns the identifier's name- Returns:
- the identifier's name
-
toString
public String toString()
Description copied from class:Token
Represents the token by its description
-
isConstant
public boolean isConstant()
Description copied from class:Token
Returns true if this token represents a constant, false otherwise- Specified by:
isConstant
in classToken
- Returns:
- true iff this Token represents a constant
-
isFunction
public boolean isFunction()
Description copied from class:Token
Returns true if this token represents a function, false otherwise- Specified by:
isFunction
in classToken
- Returns:
- true iff this Token represents a function
-
getPrecedence
public int getPrecedence()
- Specified by:
getPrecedence
in classToken
-
-