public final class Constant extends FieldExpression
FieldExpression.StringMode
alias, EMPTY_ARRAY
Constructor and Description |
---|
Constant() |
Constant(BigDecimal value) |
Constant(BigDecimal value,
String alias) |
Constant(boolean value)
Construct a new Constant.
|
Constant(boolean value,
String alias)
Construct a new Constant.
|
Constant(byte[] value) |
Constant(byte[] value,
String alias) |
Constant(Date value)
Construct a new Constant.
|
Constant(Date value,
String alias)
Construct a new Constant.
|
Constant(double value)
Construct a new Constant.
|
Constant(double value,
String alias)
Construct a new Constant.
|
Constant(float value)
Construct a new Constant.
|
Constant(float value,
String alias)
Construct a new Constant.
|
Constant(int value)
Construct a new Constant.
|
Constant(int value,
String alias)
Construct a new Constant.
|
Constant(long value)
Construct a new Constant.
|
Constant(long value,
String alias)
Construct a new Constant.
|
Constant(Point value)
Construct a new Constant.
|
Constant(Point value,
String alias)
Construct a new Constant.
|
Constant(String value)
Construct a new Constant.
|
Constant(String value,
String alias)
Construct a new Constant.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equalsIgnoreAlias(FieldExpression other)
Returns
true if other is the same as this , with the exception of alias. |
SchemaField.Type |
getType(Schema schema)
Resolve the type for this expression.
|
Object |
getValue()
Get the value.
|
boolean |
hasChildren()
Returns
true if this field expression has any sub FieldExpressions. |
int |
hashCode() |
boolean |
isConstant()
Returns
true if this field expression evaluates to a constant value. |
boolean |
isNull()
Returns
true if this constant is null. |
FieldExpression |
rewriteChildren(FieldExpressionHandler handler)
Traverse this FieldExpression using
handler to visit/rewrite direct child elements if this expression. |
void |
setValue(BigDecimal value)
Set the value.
|
void |
setValue(boolean value)
Set the value.
|
void |
setValue(byte[] value)
Set the value.
|
void |
setValue(Date value)
Set the value.
|
void |
setValue(double value)
Set the value.
|
void |
setValue(float value)
Set the value.
|
void |
setValue(int value)
Set the value.
|
void |
setValue(long value)
Set the value.
|
void |
setValue(Point value)
Set the value.
|
void |
setValue(String value)
Set the value.
|
protected void |
toString(StringBuilder buffer,
FieldExpression.StringMode mode)
Writes the string representation of this field expression to
buffer . |
static Constant |
valueOf(Object value) |
as, clone, containsAlias, copyOf, equals, equalsIgnoreAlias, getAlias, getDefaultAlias, getFieldName, handleFieldExpression, isConstant, quote, rewrite, rewrite, setAlias, toString, toString
public Constant()
public Constant(String value)
public Constant(BigDecimal value)
public Constant(BigDecimal value, String alias)
public Constant(Date value)
public Constant(Point value)
public Constant(boolean value)
public Constant(boolean value, String alias)
public Constant(int value)
public Constant(int value, String alias)
public Constant(long value)
public Constant(long value, String alias)
public Constant(float value)
public Constant(float value, String alias)
public Constant(double value)
public Constant(double value, String alias)
public Constant(byte[] value)
public Constant(byte[] value, String alias)
public boolean hasChildren()
true
if this field expression has any sub FieldExpressions.hasChildren
in class FieldExpression
public SchemaField.Type getType(Schema schema)
getType
in class FieldExpression
public boolean isConstant()
true
if this field expression evaluates to a constant value.isConstant
in class FieldExpression
public boolean isNull()
true
if this constant is null.public Object getValue()
public void setValue(byte[] value)
public void setValue(String value)
public void setValue(BigDecimal value)
public void setValue(Date value)
public void setValue(Point value)
public void setValue(int value)
public void setValue(long value)
public void setValue(float value)
public void setValue(double value)
public void setValue(boolean value)
public FieldExpression rewriteChildren(FieldExpressionHandler handler)
handler
to visit/rewrite direct child elements if this expression.
NOTE: this method traverses direct child expressions (if any) only.
rewriteChildren
in class FieldExpression
protected void toString(StringBuilder buffer, FieldExpression.StringMode mode)
buffer
.
NOTE: the alias will not be written to buffer by this function.
toString
in class FieldExpression
public boolean equalsIgnoreAlias(FieldExpression other)
true
if other
is the same as this
, with the exception of alias.equalsIgnoreAlias
in class FieldExpression
public int hashCode()
hashCode
in class FieldExpression
Copyright © 2018 Attivio, Inc. All Rights Reserved.
PATENT NOTICE: Attivio, Inc. Software Related Patents. With respect to the Attivio software product(s) being used, the following patents apply: Querying Joined Data Within A Search Engine Index: United States Patent No.(s): 8,073,840. Ordered Processing of Groups of Messages: U.S. Patent No.(s) 8,495,656. Signal processing approach to sentiment analysis for entities in documents: U.S. Patent No.(s) 8,725,494. Other U.S. and International Patents Pending.