com.vaadin.sass.internal.parser
Class VariableArgumentList

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

public class VariableArgumentList
extends SassList
implements Serializable

A VariableArgumentList is used for packing arguments into a list. There can be named and unnamed arguments, which are stored separately. VariableArgumentLists are used as parameter lists of mixins and functions.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class com.vaadin.sass.internal.parser.SassList
SassList.Separator
 
Constructor Summary
VariableArgumentList(SassList.Separator sep)
           
VariableArgumentList(SassList.Separator separator, List<SassListItem> list, List<VariableNode> named)
           
VariableArgumentList(SassList list)
           
 
Method Summary
 List<VariableNode> getNamedVariables()
           
 SassListItem replaceChains()
          Returns an object that is otherwise similar to this but chains of LexicalUnitImpl objects have been replaced with SassExpressions representing the same expressions.
 VariableArgumentList replaceFunctions()
          Returns a new item that is the result of evaluating all functions in this item.
 VariableArgumentList 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.
 
Methods inherited from class com.vaadin.sass.internal.parser.SassList
buildString, containsArithmeticalOperator, equals, evaluateArithmeticExpressions, flatten, get, getColumnNumber, getContainedValue, getItems, getLineNumber, getSeparator, getStringWithNesting, hashCode, iterator, printState, setSeparator, setSourcePosition, size, toString, unquotedString, updateUrl
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

VariableArgumentList

public VariableArgumentList(SassList list)

VariableArgumentList

public VariableArgumentList(SassList.Separator sep)

VariableArgumentList

public VariableArgumentList(SassList.Separator separator,
                            List<SassListItem> list,
                            List<VariableNode> named)
Method Detail

getNamedVariables

public List<VariableNode> getNamedVariables()

replaceVariables

public VariableArgumentList 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.

replaceFunctions

public VariableArgumentList replaceFunctions()
Description copied from interface: SassListItem
Returns a new item that is the result of evaluating all functions in this item. Does not modify this item. If the item does not change as a result of evaluating functions, an implementation can return the item itself. Otherwise a new item should be returned. For a list with both changed and unchanged items, the unchanged items can be references to the same objects as in the original list.

Specified by:
replaceFunctions in interface SassListItem
Overrides:
replaceFunctions in class SassList

replaceChains

public SassListItem replaceChains()
Description copied from interface: SassListItem
Returns an object that is otherwise similar to this but chains of LexicalUnitImpl objects have been replaced with SassExpressions representing the same expressions.

Specified by:
replaceChains in interface SassListItem
Overrides:
replaceChains in class SassList
Returns:
An object equivalent to this but with chains of LexicalUnitImpl objects replaced with corresponding SassExpressions.


Copyright © 2013–2014 Vaadin. All rights reserved.