|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.vaadin.sass.internal.parser.SassExpression
public class SassExpression
SassExpressions are used for representing and evaluating arithmetic expressions.
| Method Summary | |
|---|---|
String |
buildString(Node.BuildStringStrategy strategy)
Return a string representation of this item using the given strategy of converting items to strings. |
boolean |
containsArithmeticalOperator()
Checks whether the item contains an arithmetic expression. |
static SassListItem |
createExpression(List<SassListItem> items)
Creates a new expression containing the elements of the parameter items but with trailing whitespace items eliminated. |
SassListItem |
evaluateFunctionsAndExpressions(boolean evaluateArithmetics)
Evaluates the arithmetic expressions and functions of this item without modifying this item. |
int |
getColumnNumber()
|
LexicalUnitImpl |
getContainedValue()
|
int |
getLineNumber()
|
static int |
getNextNonspaceIndex(List<SassListItem> list,
int startIndex)
Returns the index of the next non-whitespace item in list, starting from startIndex (inclusive). |
static boolean |
isWhitespace(SassListItem unit)
|
String |
printState()
Returns a string representation of this item. |
SassExpression |
replaceVariables(Collection<VariableNode> variables)
Returns a new item that is otherwise equal to this one but all occurrences of the given variables have been replaced by the values given in the VariableNodes. |
String |
toString()
|
String |
unquotedString()
Returns a string representation of this item with surrounding quotation marks of the same type (" or ') removed. |
void |
updateUrl(String prefix)
Updates all url's of this item by, e.g., adding the prefix to an url not starting with slash "/" and not containing the symbol ":". |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Method Detail |
|---|
public static SassListItem createExpression(List<SassListItem> items)
items - A list of SassListItems.
public int getLineNumber()
getLineNumber in interface SassListItempublic int getColumnNumber()
getColumnNumber in interface SassListItempublic boolean containsArithmeticalOperator()
SassListItem
containsArithmeticalOperator in interface SassListItem
public static int getNextNonspaceIndex(List<SassListItem> list,
int startIndex)
list - A list.startIndex - The first index included in the search.
public SassListItem evaluateFunctionsAndExpressions(boolean evaluateArithmetics)
SassListItem
evaluateFunctionsAndExpressions in interface SassListItemevaluateArithmetics - True indicates that the arithmetic expressions in this item
should be evaluated. This parameter is used to handle the case
where the operator '/' should not be interpreted as an
arithmetic operation. The arithmetic expressions occurring in
the parameter lists of functions will be evaluated even if
evaluateArithmetics is false.
public SassExpression replaceVariables(Collection<VariableNode> variables)
SassListItem
replaceVariables in interface SassListItempublic void updateUrl(String prefix)
SassListItem
updateUrl in interface SassListItemprefix - The prefix to be added.public String printState()
SassListItemLexicalUnitImpl.printState(). For a list, the string
representation contains the list items separated with the separator
character of the list. No parentheses appear in the string representation
of a list, for valid CSS output.
printState in interface SassListItempublic String buildString(Node.BuildStringStrategy strategy)
SassListItemLexicalUnitImpl#buildString(BuildStringStrategy).
buildString in interface SassListItemstrategy - Specifies how an item is converted to a string. The strategy
may use the toString- and printState-methods.
public String toString()
toString in class Objectpublic String unquotedString()
SassListItem
unquotedString in interface SassListItempublic LexicalUnitImpl getContainedValue()
getContainedValue in interface SassListItempublic static boolean isWhitespace(SassListItem unit)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||