Class ConstantValue
- java.lang.Object
-
- org.apache.solr.analytics.value.constant.ConstantValue
-
- All Implemented Interfaces:
AnalyticsValue
,AnalyticsValueStream
- Direct Known Subclasses:
ConstantBooleanValue
,ConstantDateValue
,ConstantDoubleValue
,ConstantFloatValue
,ConstantIntValue
,ConstantLongValue
,ConstantStringValue
public abstract class ConstantValue extends Object implements AnalyticsValue
The parent class of all constant Analytics values.Constant values can be specified in the following ways in analytics requests:
- Constant booleans must match one of the following in any case: true, t, false, f
- Constant strings must be surrounded with "s or 's
- Constant numbers do not have to be surrounded with anything (floats are currently not supported)
- Constant dates must be formated in the ISO-8601 instant format
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.apache.solr.analytics.value.AnalyticsValue
AnalyticsValue.AbstractAnalyticsValue
-
Nested classes/interfaces inherited from interface org.apache.solr.analytics.value.AnalyticsValueStream
AnalyticsValueStream.AbstractAnalyticsValueStream, AnalyticsValueStream.ExpressionType
-
-
Field Summary
Fields Modifier and Type Field Description static ExpressionFactory.ConstantFunction
creatorFunction
-
Constructor Summary
Constructors Constructor Description ConstantValue()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AnalyticsValue
convertToConstant()
Converts this value to aConstantValue
if it's expression type isAnalyticsValueStream.ExpressionType.CONST
.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.solr.analytics.value.AnalyticsValue
exists, getObject
-
Methods inherited from interface org.apache.solr.analytics.value.AnalyticsValueStream
getExpressionStr, getExpressionType, getName, streamObjects
-
-
-
-
Field Detail
-
creatorFunction
public static final ExpressionFactory.ConstantFunction creatorFunction
-
-
Method Detail
-
convertToConstant
public AnalyticsValue convertToConstant()
Description copied from interface:AnalyticsValueStream
Converts this value to aConstantValue
if it's expression type isAnalyticsValueStream.ExpressionType.CONST
.If the value is reduced then no conversion will occur and the value itself will be returned.
- Specified by:
convertToConstant
in interfaceAnalyticsValueStream
- Returns:
- a constant representation of this value
-
-