public class ConstantBooleanValue extends ConstantValue implements BooleanValue.CastingBooleanValue
BooleanValue
. Every call to getBoolean()
and other methods will return the same constant value.BooleanValue.AbstractBooleanValue, BooleanValue.CastingBooleanValue
BooleanValueStream.AbstractBooleanValueStream, BooleanValueStream.CastingBooleanValueStream
StringValue.AbstractStringValue, StringValue.CastingStringValue
StringValueStream.AbstractStringValueStream, StringValueStream.CastingStringValueStream
AnalyticsValue.AbstractAnalyticsValue
AnalyticsValueStream.ExpressionType
Modifier and Type | Field and Description |
---|---|
static String |
name |
creatorFunction
Constructor and Description |
---|
ConstantBooleanValue(boolean value) |
Modifier and Type | Method and Description |
---|---|
boolean |
exists()
Check whether the current value exists.
|
boolean |
getBoolean()
Get the boolean representation of the current value.
|
String |
getExpressionStr()
Get the expression string of the analytics value stream.
|
AnalyticsValueStream.ExpressionType |
getExpressionType()
Get the type of the expression that this class represents.
|
String |
getName()
Get the name of function or value.
|
Object |
getObject()
Get the object representation of the current value.
|
ConstantComparator |
getObjectComparator(String expression)
Create an entry comparator used to sort the facet-value buckets of a facet.
|
String |
getString()
Get the String representation of the current value.
|
void |
streamBooleans(BooleanConsumer cons)
Stream the boolean representations of all current values, if any exist.
|
void |
streamObjects(Consumer<Object> cons)
Stream the object representations of all current values, if any exist.
|
void |
streamStrings(Consumer<String> cons)
Stream the String representations of all current values, if any exist.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
createExpressionString, determineMappingPhase
public static final String name
public boolean getBoolean()
BooleanValue
NOTE: The value returned is not valid unless calling AnalyticsValue.exists()
afterwards returns TRUE
.
getBoolean
in interface BooleanValue
public String getString()
StringValue
NOTE: The value returned is not valid unless calling AnalyticsValue.exists()
afterwards returns TRUE
.
getString
in interface StringValue
public Object getObject()
AnalyticsValue
getObject
in interface AnalyticsValue
public boolean exists()
AnalyticsValue
get<Type>()
method is called.exists
in interface AnalyticsValue
public void streamBooleans(BooleanConsumer cons)
BooleanValueStream
streamBooleans
in interface BooleanValueStream
cons
- The consumer to accept the valuespublic void streamStrings(Consumer<String> cons)
StringValueStream
streamStrings
in interface StringValueStream
cons
- The consumer to accept the valuespublic void streamObjects(Consumer<Object> cons)
AnalyticsValueStream
streamObjects
in interface AnalyticsValueStream
cons
- The consumer to accept the valuespublic ConstantComparator getObjectComparator(String expression)
ComparableValue
getObjectComparator
in interface ComparableValue
expression
- the name of the expression in the results arraypublic String getName()
AnalyticsValueStream
getName
in interface AnalyticsValueStream
public String getExpressionStr()
AnalyticsValueStream
ExpressionFactory.createExpression(String)
, the exact same expression should be created.getExpressionStr
in interface AnalyticsValueStream
public AnalyticsValueStream.ExpressionType getExpressionType()
AnalyticsValueStream
getExpressionType
in interface AnalyticsValueStream
Copyright © 2000-2017 Apache Software Foundation. All Rights Reserved.