Class CssDeclarationValueTokenizer.Token
- java.lang.Object
-
- com.itextpdf.styledxmlparser.css.parse.CssDeclarationValueTokenizer.Token
-
- Enclosing class:
- CssDeclarationValueTokenizer
public static class CssDeclarationValueTokenizer.Token extends java.lang.Object
The Token class.
-
-
Field Summary
Fields Modifier and Type Field Description private boolean
hasSpace
private char
stringQuote
private CssDeclarationValueTokenizer.TokenType
type
The type.private java.lang.String
value
The value.
-
Constructor Summary
Constructors Constructor Description Token(java.lang.String value, CssDeclarationValueTokenizer.TokenType type)
Creates a newCssDeclarationValueTokenizer.Token
instance.Token(java.lang.String value, CssDeclarationValueTokenizer.TokenType type, char stringQuote)
Token(java.lang.String value, CssDeclarationValueTokenizer.TokenType type, char stringQuote, boolean hasSpace)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description char
getStringQuote()
Gets the quotes of the string.CssDeclarationValueTokenizer.TokenType
getType()
Gets the type.java.lang.String
getValue()
Gets the value.boolean
hasSpace()
Gets the flag if token contains whitespace.boolean
isString()
Checks if the token is a string.java.lang.String
toString()
-
-
-
Field Detail
-
value
private final java.lang.String value
The value.
-
type
private final CssDeclarationValueTokenizer.TokenType type
The type.
-
stringQuote
private final char stringQuote
-
hasSpace
private final boolean hasSpace
-
-
Constructor Detail
-
Token
public Token(java.lang.String value, CssDeclarationValueTokenizer.TokenType type)
Creates a newCssDeclarationValueTokenizer.Token
instance.- Parameters:
value
- the valuetype
- the type
-
Token
Token(java.lang.String value, CssDeclarationValueTokenizer.TokenType type, char stringQuote)
-
Token
Token(java.lang.String value, CssDeclarationValueTokenizer.TokenType type, char stringQuote, boolean hasSpace)
-
-
Method Detail
-
getValue
public java.lang.String getValue()
Gets the value.- Returns:
- the value
-
getType
public CssDeclarationValueTokenizer.TokenType getType()
Gets the type.- Returns:
- the type
-
getStringQuote
public char getStringQuote()
Gets the quotes of the string.- Returns:
0
if the token isn't a string or there are no quotes,quote char
otherwise
-
hasSpace
public boolean hasSpace()
Gets the flag if token contains whitespace.- Returns:
- true, if containing whitespace
-
isString
public boolean isString()
Checks if the token is a string.- Returns:
- true, if is string
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-