Package org.apache.solr.analytics
Class AnalyticsExpression
- java.lang.Object
-
- org.apache.solr.analytics.AnalyticsExpression
-
public class AnalyticsExpression extends Object
A wrapper for a top-level analytics expression. The expression must have a name and be single valued.
-
-
Constructor Summary
Constructors Constructor Description AnalyticsExpression(String name, AnalyticsValue expression)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
exists()
NOTE: Must be called aftertoObject()
is called, otherwise the value is not guaranteed to be correct.AnalyticsValue
getExpression()
String
getName()
Object
toObject()
Get the current value of the expression.
-
-
-
Constructor Detail
-
AnalyticsExpression
public AnalyticsExpression(String name, AnalyticsValue expression)
-
-
Method Detail
-
getName
public String getName()
-
getExpression
public AnalyticsValue getExpression()
-
toObject
public Object toObject()
Get the current value of the expression. This method can, and will, be called multiple times to return different values. The value returned is based on theReductionCollectionManager.ReductionDataCollection
given to theReductionCollectionManager.setData(org.apache.solr.analytics.function.ReductionCollectionManager.ReductionDataCollection)
method.- Returns:
- the current value of the expression
-
exists
public boolean exists()
NOTE: Must be called aftertoObject()
is called, otherwise the value is not guaranteed to be correct.- Returns:
- whether the current value of the expression exists.
-
-