public class SumFunction extends DoubleValue.AbstractDoubleValue implements ReductionFunction
Modifier and Type | Class and Description |
---|---|
protected static class |
SumFunction.SumData |
AnalyticsValue.AbstractAnalyticsValue
AnalyticsValueStream.AbstractAnalyticsValueStream, AnalyticsValueStream.ExpressionType
DoubleValue.AbstractDoubleValue, DoubleValue.CastingDoubleValue
DoubleValueStream.AbstractDoubleValueStream, DoubleValueStream.CastingDoubleValueStream
StringValue.AbstractStringValue, StringValue.CastingStringValue
StringValueStream.AbstractStringValueStream, StringValueStream.CastingStringValueStream
Modifier and Type | Field and Description |
---|---|
static ExpressionFactory.CreatorFunction |
creatorFunction |
static String |
name |
Constructor and Description |
---|
SumFunction(DoubleValueStream param) |
Modifier and Type | Method and Description |
---|---|
boolean |
exists()
Check whether the current value exists.
|
double |
getDouble()
Get the double 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.
|
void |
synchronizeDataCollectors(UnaryOperator<ReductionDataCollector<?>> sync)
Syncs the data collectors with shared versions across the entire Analytics Request
so that as little data as possible is sent across shards.
|
convertToConstant, getObject, getObjectComparator, getString, streamDoubles, streamObjects, streamStrings
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getObject
convertToConstant, createExpressionString, determineMappingPhase, streamObjects
public static final String name
public static final ExpressionFactory.CreatorFunction creatorFunction
public SumFunction(DoubleValueStream param)
public double getDouble()
DoubleValue
NOTE: The value returned is not valid unless calling AnalyticsValue.exists()
afterwards returns TRUE
.
getDouble
in interface DoubleValue
public boolean exists()
AnalyticsValue
get<Type>()
method is called.exists
in interface AnalyticsValue
public void synchronizeDataCollectors(UnaryOperator<ReductionDataCollector<?>> sync)
ReductionFunction
synchronizeDataCollectors
in interface ReductionFunction
sync
- a function that takes in a ReductionDataCollector
and returns a shared versionpublic String getExpressionStr()
AnalyticsValueStream
ExpressionFactory.createExpression(String)
, the exact same expression should be created.getExpressionStr
in interface AnalyticsValueStream
public String getName()
AnalyticsValueStream
getName
in interface AnalyticsValueStream
public AnalyticsValueStream.ExpressionType getExpressionType()
AnalyticsValueStream
getExpressionType
in interface AnalyticsValueStream
Copyright © 2000-2018 Apache Software Foundation. All Rights Reserved.