Package org.apache.solr.analytics.value
Class BooleanValue.AbstractBooleanValue
- java.lang.Object
-
- org.apache.solr.analytics.value.BooleanValue.AbstractBooleanValue
-
- All Implemented Interfaces:
AnalyticsValue,AnalyticsValueStream,BooleanValue,BooleanValue.CastingBooleanValue,BooleanValueStream,ComparableValue,StringValue,StringValueStream
- Enclosing interface:
- BooleanValue
public abstract static class BooleanValue.AbstractBooleanValue extends Object implements BooleanValue.CastingBooleanValue
An abstract base forBooleanValue.CastingBooleanValuethat automatically casts to all types ifBooleanValue.getBoolean()andAnalyticsValue.exists()are implemented.
-
-
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
-
Nested classes/interfaces inherited from interface org.apache.solr.analytics.value.BooleanValue
BooleanValue.AbstractBooleanValue, BooleanValue.CastingBooleanValue
-
Nested classes/interfaces inherited from interface org.apache.solr.analytics.value.BooleanValueStream
BooleanValueStream.AbstractBooleanValueStream, BooleanValueStream.CastingBooleanValueStream
-
Nested classes/interfaces inherited from interface org.apache.solr.analytics.value.StringValue
StringValue.AbstractStringValue, StringValue.CastingStringValue
-
Nested classes/interfaces inherited from interface org.apache.solr.analytics.value.StringValueStream
StringValueStream.AbstractStringValueStream, StringValueStream.CastingStringValueStream
-
-
Constructor Summary
Constructors Constructor Description AbstractBooleanValue()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AnalyticsValueconvertToConstant()Converts this value to aConstantValueif it's expression type isAnalyticsValueStream.ExpressionType.CONST.ObjectgetObject()Get the object representation of the current value.ExpressionComparator<Boolean>getObjectComparator(String expression)Create an entry comparator used to sort the facet-value buckets of a facet.StringgetString()Get the String representation of the current value.voidstreamBooleans(BooleanConsumer cons)Stream the boolean representations of all current values, if any exist.voidstreamObjects(Consumer<Object> cons)Stream the object representations of all current values, if any exist.voidstreamStrings(Consumer<String> cons)Stream the String representations of all current values, if any exist.-
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
-
Methods inherited from interface org.apache.solr.analytics.value.AnalyticsValueStream
getExpressionStr, getExpressionType, getName
-
Methods inherited from interface org.apache.solr.analytics.value.BooleanValue
getBoolean
-
-
-
-
Method Detail
-
getString
public String getString()
Description copied from interface:StringValueGet the String representation of the current value.NOTE: The value returned is not valid unless calling
AnalyticsValue.exists()afterwards returnsTRUE.- Specified by:
getStringin interfaceStringValue- Returns:
- the current value
-
getObject
public Object getObject()
Description copied from interface:AnalyticsValueGet the object representation of the current value.- Specified by:
getObjectin interfaceAnalyticsValue- Returns:
- the current value
-
streamBooleans
public void streamBooleans(BooleanConsumer cons)
Description copied from interface:BooleanValueStreamStream the boolean representations of all current values, if any exist.- Specified by:
streamBooleansin interfaceBooleanValueStream- Parameters:
cons- The consumer to accept the values
-
streamStrings
public void streamStrings(Consumer<String> cons)
Description copied from interface:StringValueStreamStream the String representations of all current values, if any exist.- Specified by:
streamStringsin interfaceStringValueStream- Parameters:
cons- The consumer to accept the values
-
streamObjects
public void streamObjects(Consumer<Object> cons)
Description copied from interface:AnalyticsValueStreamStream the object representations of all current values, if any exist.- Specified by:
streamObjectsin interfaceAnalyticsValueStream- Parameters:
cons- The consumer to accept the values
-
convertToConstant
public AnalyticsValue convertToConstant()
Description copied from interface:AnalyticsValueStreamConverts this value to aConstantValueif 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:
convertToConstantin interfaceAnalyticsValueStream- Returns:
- a constant representation of this value
-
getObjectComparator
public ExpressionComparator<Boolean> getObjectComparator(String expression)
Description copied from interface:ComparableValueCreate an entry comparator used to sort the facet-value buckets of a facet.- Specified by:
getObjectComparatorin interfaceComparableValue- Parameters:
expression- the name of the expression in the results array- Returns:
- a comparator to sort the buckets with
-
-