com.vaadin.sass.internal.parser
Class Variable

java.lang.Object
  extended by com.vaadin.sass.internal.parser.Variable
All Implemented Interfaces:
Definition, Serializable

public class Variable
extends Object
implements Definition, Serializable

Variable with an immutable name, a modifiable value and an optional flag indicating whether it is guarded. Guarded variables are not overwritten by further assignments to the same variable (except possibly for assignment of the value null).

See Also:
Serialized Form

Constructor Summary
Variable(String name, SassListItem expr)
           
Variable(String name, SassListItem expr, boolean guarded)
           
 
Method Summary
 Variable copy()
           
 SassListItem getExpr()
           
 String getName()
           
 boolean isGuarded()
           
 String replaceInterpolation(String s)
          Replaces each occurrence of ${name} in the parameter.
 void setExpr(SassListItem expr)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Variable

public Variable(String name,
                SassListItem expr)

Variable

public Variable(String name,
                SassListItem expr,
                boolean guarded)
Method Detail

getExpr

public SassListItem getExpr()

setExpr

public void setExpr(SassListItem expr)

getName

public String getName()
Specified by:
getName in interface Definition

isGuarded

public boolean isGuarded()

copy

public Variable copy()

replaceInterpolation

public String replaceInterpolation(String s)
Replaces each occurrence of ${name} in the parameter. Only evaluates the variable if at least one such occurrence, and then only evaluates it once.



Copyright © 2013–2015 Vaadin. All rights reserved.