Package com.attivio.sdk.search.fields
Class UnaryMathExpression
- java.lang.Object
-
- com.attivio.sdk.search.fields.FieldExpression
-
- com.attivio.sdk.search.fields.UnaryFieldExpression
-
- com.attivio.sdk.search.fields.UnaryMathExpression
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Cloneable
public final class UnaryMathExpression extends UnaryFieldExpression
Mathematical expression for transforming a single argument.NOTE: if the underlaying FieldExpression returns multiple values, each value will be operated on individually.
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
UnaryMathExpression.Method
Unary Function type.-
Nested classes/interfaces inherited from class com.attivio.sdk.search.fields.FieldExpression
FieldExpression.StringMode
-
-
Field Summary
-
Fields inherited from class com.attivio.sdk.search.fields.UnaryFieldExpression
expression
-
Fields inherited from class com.attivio.sdk.search.fields.FieldExpression
EMPTY_ARRAY
-
-
Constructor Summary
Constructors Constructor Description UnaryMathExpression(UnaryMathExpression.Method method, FieldExpression expression)
Construct a new UnaryMathExpression to apply to aFieldExpression
.UnaryMathExpression(UnaryMathExpression.Method method, java.lang.String fieldName)
Construct a new UnaryMathExpression to apply to a field.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description UnaryMathExpression
clone()
protected UnaryMathExpression
clone(FieldExpression e)
Create a new instance of this FieldExpression, with a different argument.boolean
equals(java.lang.Object other)
UnaryMathExpression.Method
getMethod()
Get the method to use.SchemaField.Type
getType(Schema schema)
Resolve the type for this expression.int
hashCode()
boolean
isConstant()
Returnstrue
if this field expression evaluates to a constant value.protected void
toString(java.lang.StringBuilder buffer, FieldExpression.StringMode mode)
Writes the string representation of this field expression tobuffer
.-
Methods inherited from class com.attivio.sdk.search.fields.UnaryFieldExpression
forEachField, getExpression, getFieldName, hasChildren, rewrite, setExpression
-
Methods inherited from class com.attivio.sdk.search.fields.FieldExpression
apply, copyOf, forEachPhrase, forEachQuery, getDefaultName, isConstant, parse, quote, rewrite, rewriteChildren, toString, toString, valueOf
-
-
-
-
Constructor Detail
-
UnaryMathExpression
public UnaryMathExpression(UnaryMathExpression.Method method, java.lang.String fieldName)
Construct a new UnaryMathExpression to apply to a field.
-
UnaryMathExpression
public UnaryMathExpression(UnaryMathExpression.Method method, FieldExpression expression)
Construct a new UnaryMathExpression to apply to aFieldExpression
.
-
-
Method Detail
-
getType
public SchemaField.Type getType(Schema schema)
Resolve the type for this expression.- Specified by:
getType
in classFieldExpression
-
isConstant
public boolean isConstant()
Returnstrue
if this field expression evaluates to a constant value.- Overrides:
isConstant
in classUnaryFieldExpression
-
getMethod
public UnaryMathExpression.Method getMethod()
Get the method to use.
-
toString
protected void toString(java.lang.StringBuilder buffer, FieldExpression.StringMode mode)
Writes the string representation of this field expression tobuffer
.- Specified by:
toString
in classFieldExpression
-
equals
public boolean equals(java.lang.Object other)
- Overrides:
equals
in classUnaryFieldExpression
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classUnaryFieldExpression
-
clone
public UnaryMathExpression clone()
- Overrides:
clone
in classUnaryFieldExpression
-
clone
protected UnaryMathExpression clone(FieldExpression e)
Create a new instance of this FieldExpression, with a different argument.- Overrides:
clone
in classUnaryFieldExpression
-
-