Package dev.amp.validator.css
Class Token
- java.lang.Object
-
- com.steadystate.css.parser.Token
-
- dev.amp.validator.css.Token
-
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
EOFToken,ErrorToken,ParsedCssUrl,Rule,Selector
public abstract class Token extends com.steadystate.css.parser.TokenThe abstract superclass for all tokens.- Author:
- nhant01, GeorgeLuo
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description Token()Constructor for Token object, sets default location values
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description intgetCol()Returns value column of token.intgetLine()Getter for Token's line.abstract TokenTypegetTokenType()Overwrite from children class to get token typeObjectgetValue()Returns value of token.voidsetCol(int col)Setter for Token's column.voidsetLine(int line)Setter for line value.StringtoString()
-
-
-
Method Detail
-
getTokenType
public abstract TokenType getTokenType()
Overwrite from children class to get token type- Returns:
- the type of the token.
-
setLine
public void setLine(int line)
Setter for line value.- Parameters:
line- the value to set in line.
-
setCol
public void setCol(int col)
Setter for Token's column.- Parameters:
col- value to set in column.
-
getLine
public int getLine()
Getter for Token's line.- Returns:
- a String value of the token from parent class Token.
-
getValue
public Object getValue()
Returns value of token.- Overrides:
getValuein classcom.steadystate.css.parser.Token- Returns:
- a value of the token from parent class Token, most of time is String, few cases will return a list of tokens
-
getCol
public int getCol()
Returns value column of token.- Returns:
- a column value from token
-
toString
public String toString()
- Overrides:
toStringin classcom.steadystate.css.parser.Token
-
-