Class GssFunctions.MinValue
java.lang.Object
com.google.common.css.compiler.gssfunctions.GssFunctions.MinValue
- All Implemented Interfaces:
GssFunction
- Enclosing class:
- GssFunctions
A
GssFunction that returns the min value from its list of
arguments.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected CssNumericNodecalculate(List<CssNumericNode> args, ErrorManager errorManager) getCallResultNodes(List<CssValueNode> args, ErrorManager errorManager) Returns a new value of the same unit as the original.getCallResultString(List<String> args) Processes a list of strings as function arguments and returns a string result.Returns the number of expected arguments of this GSS function.protected booleanisIdentityValue(double value) By default, this method returnsfalse.protected doubleperformOperation(double left, double right)
-
Constructor Details
-
MinValue
public MinValue()
-
-
Method Details
-
performOperation
protected double performOperation(double left, double right) -
getNumExpectedArguments
Returns the number of expected arguments of this GSS function.- Specified by:
getNumExpectedArgumentsin interfaceGssFunction- Returns:
- Number of expected arguments
-
getCallResultNodes
public List<CssValueNode> getCallResultNodes(List<CssValueNode> args, ErrorManager errorManager) throws GssFunctionException Returns a new value of the same unit as the original.- Specified by:
getCallResultNodesin interfaceGssFunction- Parameters:
args- The list of arguments- Returns:
- The resulting fingerprint as a numeric node in a list
- Throws:
GssFunctionException
-
getCallResultString
Description copied from interface:GssFunctionProcesses a list of strings as function arguments and returns a string result. Errors are reported by throwingGssFunctionException.- Specified by:
getCallResultStringin interfaceGssFunction- Throws:
GssFunctionException
-
calculate
protected CssNumericNode calculate(List<CssNumericNode> args, ErrorManager errorManager) throws GssFunctionException - Throws:
GssFunctionException
-
isIdentityValue
protected boolean isIdentityValue(double value) By default, this method returnsfalse.- Returns:
- whether the identity value has no effect on the output. In this case, any units (px, pt, etc.) will be ignored.
-