Class AbstractHSLFunction
- Object
-
- ExpressionAbstract
-
- FunctionImpl
-
- AbstractHSLFunction
-
- All Implemented Interfaces:
Expression
,Function
- Direct Known Subclasses:
DarkenFunction
,DesaturateFunction
,LightenFunction
,SaturateFunction
public abstract class AbstractHSLFunction extends FunctionImpl
Base for lesscss.org HSL color manipulation functions- Author:
- Andrea Aime - GeoSolutions
-
-
Field Summary
Fields Modifier and Type Field Description static FunctionName
NAME
-
Fields inherited from class FunctionImpl
functionName
-
Fields inherited from interface Expression
NIL
-
-
Constructor Summary
Constructors Constructor Description AbstractHSLFunction(String name)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract void
adjustAbsolute(float amount, HSLColor hsl)
protected abstract void
adjustRelative(float amount, HSLColor hsl)
Object
evaluate(Object object)
Default implementation simply returns the fallbackValue.String
toString()
Creates a String representation of this Function with the function name and the arguments.-
Methods inherited from class FunctionImpl
accept, dispatchArguments, equals, functionName, getFallbackValue, getFunctionName, getName, getParameters, getParameterValue, getParameterValue, hashCode, setFallbackValue, setName, setParameters
-
Methods inherited from class ExpressionAbstract
evaluate
-
Methods inherited from interface Expression
evaluate
-
-
-
-
Field Detail
-
NAME
public static FunctionName NAME
-
-
Constructor Detail
-
AbstractHSLFunction
public AbstractHSLFunction(String name)
-
-
Method Detail
-
evaluate
public Object evaluate(Object object)
Description copied from class:FunctionImpl
Default implementation simply returns the fallbackValue.Please override this method to produce a value based on the provided arguments.
- Specified by:
evaluate
in interfaceExpression
- Overrides:
evaluate
in classFunctionImpl
- Parameters:
object
- Object being evaluated; often a Feature- Returns:
- value for the provided object
-
adjustRelative
protected abstract void adjustRelative(float amount, HSLColor hsl)
-
adjustAbsolute
protected abstract void adjustAbsolute(float amount, HSLColor hsl)
-
toString
public String toString()
Creates a String representation of this Function with the function name and the arguments.- Overrides:
toString
in classFunctionImpl
-
-