public class TermFunctionImpl extends TermListImpl implements TermFunction
TermFunction.Attr, TermFunction.Blur, TermFunction.Brightness, TermFunction.Contrast, TermFunction.Counter, TermFunction.CounterFunction, TermFunction.Counters, TermFunction.CubicBezier, TermFunction.DropShadow, TermFunction.FilterFunction, TermFunction.FitContent, TermFunction.Frames, TermFunction.Gradient, TermFunction.Grayscale, TermFunction.GridFunction, TermFunction.HueRotate, TermFunction.Invert, TermFunction.LinearGradient, TermFunction.Matrix, TermFunction.Matrix3d, TermFunction.MinMax, TermFunction.Opacity, TermFunction.Perspective, TermFunction.RadialGradient, TermFunction.Repeat, TermFunction.Rotate, TermFunction.Rotate3d, TermFunction.RotateX, TermFunction.RotateY, TermFunction.RotateZ, TermFunction.Saturate, TermFunction.Scale, TermFunction.Scale3d, TermFunction.ScaleX, TermFunction.ScaleY, TermFunction.ScaleZ, TermFunction.Sepia, TermFunction.Skew, TermFunction.SkewX, TermFunction.SkewY, TermFunction.Steps, TermFunction.TimingFunction, TermFunction.TransformFunction, TermFunction.Translate, TermFunction.Translate3d, TermFunction.TranslateX, TermFunction.TranslateY, TermFunction.TranslateZTerm.Operator| Modifier and Type | Field and Description |
|---|---|
protected static TermOperator |
DEFAULT_ARG_SEP |
protected String |
functionName |
protected boolean |
valid |
operator, valuemodCount| Modifier | Constructor and Description |
|---|---|
protected |
TermFunctionImpl() |
| Modifier and Type | Method and Description |
|---|---|
protected TermAngle |
convertSideOrCorner(List<Term<?>> aarg) |
boolean |
equals(Object obj) |
protected TermAngle |
getAngleArg(Term<?> term) |
String |
getFunctionName()
Gets the name of the function.
|
protected TermLength |
getLengthArg(Term<?> term) |
protected TermLengthOrPercent |
getLengthOrPercentArg(Term<?> term) |
protected float |
getNumberArg(Term<?> term) |
List<List<Term<?>>> |
getSeparatedArgs(Term<?> separator)
Splits the list of arguments to several lists based on the given separator term.
|
List<Term<?>> |
getSeparatedValues(Term<?> separator,
boolean allowKeywords)
Splits the list of arguments using the given separator term and tries to convert the
arguments to typed values (lengths, times, numbers, etc...)
|
List<Term<?>> |
getValues(boolean allowKeywords)
Tries to convert the terms to a list of typed values (lengths, times, numbers, etc...).
|
int |
hashCode() |
protected boolean |
isNumberArg(Term<?> term) |
boolean |
isValid()
Checks whether the arguments passed using
setValue() are valid for this function. |
protected boolean |
prependMinus(Term<?> term) |
TermFunction |
setFunctionName(String functionName) |
void |
setValid(boolean valid) |
TermList |
setValue(List<Term<?>> value)
Setter for value
|
String |
toString() |
add, add, get, getOperator, getValue, iterator, remove, setOperator, shallowClone, sizeaddAll, clear, indexOf, lastIndexOf, listIterator, listIterator, removeRange, set, subListaddAll, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArrayclone, finalize, getClass, notify, notifyAll, wait, wait, waitgetOperator, getValue, setOperator, shallowCloneadd, add, addAll, addAll, clear, contains, containsAll, get, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, replaceAll, retainAll, set, size, sort, spliterator, subList, toArray, toArrayparallelStream, removeIf, streamprotected static final TermOperator DEFAULT_ARG_SEP
protected String functionName
protected boolean valid
public String getFunctionName()
TermFunctiongetFunctionName in interface TermFunctionpublic TermFunction setFunctionName(String functionName)
setFunctionName in interface TermFunctionfunctionName - the functionName to setpublic boolean isValid()
TermFunctionsetValue() are valid for this function.isValid in interface TermFunctiontrue when the function has valid argumentspublic void setValid(boolean valid)
public TermList setValue(List<Term<?>> value)
Termprotected boolean prependMinus(Term<?> term)
public List<List<Term<?>>> getSeparatedArgs(Term<?> separator)
TermFunctiongetSeparatedArgs in interface TermFunctionseparator - The term used as a separator (typically TermOperator(',').public List<Term<?>> getSeparatedValues(Term<?> separator, boolean allowKeywords)
TermFunctiongetSeparatedValues in interface TermFunctionseparator - The term used as a separator (typically TermOperator(',').null in case that the arguments cannot be converted to values.public List<Term<?>> getValues(boolean allowKeywords)
TermFunctiongetValues in interface TermFunctionnull in case that the arguments cannot be converted to values.public String toString()
toString in class TermListImplpublic int hashCode()
hashCode in interface Collection<Term<?>>hashCode in interface List<Term<?>>hashCode in class TermListImplpublic boolean equals(Object obj)
equals in interface Collection<Term<?>>equals in interface List<Term<?>>equals in class TermListImplprotected boolean isNumberArg(Term<?> term)
protected float getNumberArg(Term<?> term)
protected TermLength getLengthArg(Term<?> term)
protected TermLengthOrPercent getLengthOrPercentArg(Term<?> term)
Copyright © 2019. All rights reserved.