com.vaadin.sass.internal.parser
Class ArgumentList

java.lang.Object
  extended by com.vaadin.sass.internal.parser.SassList
      extended by com.vaadin.sass.internal.parser.ArgumentList
All Implemented Interfaces:
SassListItem, Serializable, Iterable<SassListItem>

public class ArgumentList
extends SassList
implements Serializable

An ArgumentList is used for packing arguments into a list. There can be named and unnamed arguments, which are stored separately. ArgumentList is used for representing the arguments of a function or a mixin. ArgumentList is also used in ActualArgumentList to represent the unnamed (positional) and named parameters of an @include or a function call.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class com.vaadin.sass.internal.parser.SassList
SassList.Separator
 
Constructor Summary
ArgumentList(SassList.Separator separator, List<SassListItem> newParamValues)
           
ArgumentList(SassList.Separator separator, List<SassListItem> list, List<VariableNode> named)
           
ArgumentList(SassList.Separator sep, SassListItem... items)
           
ArgumentList(SassList list)
           
 
Method Summary
 ArgumentList evaluateFunctionsAndExpressions(boolean evaluateArithmetics)
          Evaluates the arithmetic expressions and functions of this item without modifying this item.
 List<VariableNode> getNamedVariables()
           
protected  SassList.Separator getSeparator(SassListItem expr)
           
 ArgumentList 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()
           
 
Methods inherited from class com.vaadin.sass.internal.parser.SassList
buildString, containsArithmeticalOperator, equals, flatten, get, getColumnNumber, getContainedValue, getItems, getLineNumber, getSeparator, getStringWithNesting, hashCode, iterator, printState, setSeparator, setSourcePosition, size, unquotedString, updateUrl
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ArgumentList

public ArgumentList(SassList list)

ArgumentList

public ArgumentList(SassList.Separator separator,
                    List<SassListItem> list,
                    List<VariableNode> named)

ArgumentList

public ArgumentList(SassList.Separator sep,
                    SassListItem... items)

ArgumentList

public ArgumentList(SassList.Separator separator,
                    List<SassListItem> newParamValues)
Method Detail

getNamedVariables

public List<VariableNode> getNamedVariables()

replaceVariables

public ArgumentList replaceVariables(Collection<VariableNode> variables)
Description copied from interface: SassListItem
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. Does not modify this item.

Specified by:
replaceVariables in interface SassListItem
Overrides:
replaceVariables in class SassList
Returns:
A SassListItem where all occurrences of variables have been replaced by their values.

evaluateFunctionsAndExpressions

public ArgumentList evaluateFunctionsAndExpressions(boolean evaluateArithmetics)
Description copied from interface: SassListItem
Evaluates the arithmetic expressions and functions of this item without modifying this item.

Specified by:
evaluateFunctionsAndExpressions in interface SassListItem
Overrides:
evaluateFunctionsAndExpressions in class SassList
Parameters:
evaluateArithmetics - 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.
Returns:
For single values, the result of the arithmetic expression or function. For a list, a copy of the list where the arithmetic expressions and functions have been replaced with their evaluated values.

getSeparator

protected SassList.Separator getSeparator(SassListItem expr)

toString

public String toString()
Overrides:
toString in class SassList


Copyright © 2013–2014 Vaadin. All rights reserved.