public class IfFunction extends AnalyticsValueStream.AbstractAnalyticsValueStream
 Three arguments are required. The first, the conditional parameter, must be a BooleanValue and
 the later two, the if and else parameters, can be any type of AnalyticsValueStream. 
 For each document, if the conditional value is true then the if-value is used otherwise the else-value is used.
 
 The resulting Value or ValueStream will be typed with the closest super-type of the two non-conditional parameters.
 (e.g. "if"(boolean,double,int) will return a double)
 If two AnalyticsValues are passed as the if-else parameters, an AnalyticsValue will be returned.
 If either parameter isn't single-valued, a AnalyticsValueStream will be returned.
AnalyticsValueStream.AbstractAnalyticsValueStream, AnalyticsValueStream.ExpressionType| Modifier and Type | Field and Description | 
|---|---|
static ExpressionFactory.CreatorFunction | 
creatorFunction  | 
static String | 
name  | 
| Constructor and Description | 
|---|
IfFunction(BooleanValue ifExpr,
          AnalyticsValueStream thenExpr,
          AnalyticsValueStream elseExpr)  | 
| Modifier and Type | Method and Description | 
|---|---|
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 | 
streamObjects(Consumer<Object> cons)
Stream the object representations of all current values, if any exist. 
 | 
convertToConstantclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcreateExpressionString, determineMappingPhasepublic static final String name
public static final ExpressionFactory.CreatorFunction creatorFunction
public IfFunction(BooleanValue ifExpr, AnalyticsValueStream thenExpr, AnalyticsValueStream elseExpr) throws SolrException
SolrExceptionpublic void streamObjects(Consumer<Object> cons)
AnalyticsValueStreamcons - The consumer to accept the valuespublic String getName()
AnalyticsValueStreampublic String getExpressionStr()
AnalyticsValueStreamExpressionFactory.createExpression(String), the exact same expression should be created.public AnalyticsValueStream.ExpressionType getExpressionType()
AnalyticsValueStreamCopyright © 2000-2018 Apache Software Foundation. All Rights Reserved.