com.vaadin.sass.internal.parser.function
Class AbstractSingleParameterFunctionGenerator
java.lang.Object
com.vaadin.sass.internal.parser.function.AbstractFunctionGenerator
com.vaadin.sass.internal.parser.function.AbstractSingleParameterFunctionGenerator
- All Implemented Interfaces:
- SCSSFunctionGenerator
- Direct Known Subclasses:
- AbsFunctionGenerator, CeilFunctionGenerator, FloorFunctionGenerator, PercentageFunctionGenerator, RoundFunctionGenerator
public abstract class AbstractSingleParameterFunctionGenerator
- extends AbstractFunctionGenerator
AbstractSingleParameterFunctionGenerator is used as a base class for
implementing Sass functions that take exactly one single value parameter. A
single value parameter is of type LexicalUnitImpl.
- Author:
- Vaadin
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AbstractSingleParameterFunctionGenerator
public AbstractSingleParameterFunctionGenerator(String... functionNames)
compute
public SassListItem compute(LexicalUnitImpl function)
- Description copied from interface:
SCSSFunctionGenerator
- Computes the value of the function. The parameters should be evaluated
before this method is called.
Both the input and the output of the method should be separate from any
chain of lexical units.
- Parameters:
function - Function lexical unit to print its state
- Returns:
- SassListItem the value of the function
computeForParam
protected abstract LexicalUnitImpl computeForParam(String functionName,
LexicalUnitImpl firstParam)
- Compute the value of the function.
This method must not modify firstParam. If necessary, the implementation
should copy the parameter before making modifications.
- Parameters:
functionName - The name of the function whose value is to be computed.firstParam - The only parameter of the function.
- Returns:
Copyright © 2013–2014 Vaadin. All rights reserved.