Class ExpressionList
- java.lang.Object
-
- dev.morphia.aggregation.expressions.impls.Expression
-
- dev.morphia.aggregation.expressions.impls.ExpressionList
-
- All Implemented Interfaces:
SingleValuedExpression
@MorphiaInternal public class ExpressionList extends Expression implements SingleValuedExpression
Wraps a list of expressions as an Expression so we can generically deal with all values as Expressions- Since:
- 2.3
Developer note.This is an internal item. Its function and presence are subject to change without warning. Its use is highly discouraged.
-
-
Constructor Summary
Constructors Constructor Description ExpressionList(Expression... values)ExpressionList(List<Expression> values)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidadd(Expression expression)static ExpressionListcoalesce(Expression first, Expression... values)voidencode(Datastore datastore, BsonWriter writer, EncoderContext encoderContext)ExpressiongetValue()List<Expression>getValues()-
Methods inherited from class dev.morphia.aggregation.expressions.impls.Expression
getOperation, toString
-
-
-
-
Constructor Detail
-
ExpressionList
public ExpressionList(List<Expression> values)
-
ExpressionList
public ExpressionList(Expression... values)
-
-
Method Detail
-
coalesce
@NonNull public static ExpressionList coalesce(Expression first, Expression... values)
-
add
public void add(Expression expression)
-
encode
public void encode(Datastore datastore, BsonWriter writer, EncoderContext encoderContext)
- Overrides:
encodein classExpression- Parameters:
datastore- the datastorewriter- the writerencoderContext- the context
-
getValue
public Expression getValue()
- Overrides:
getValuein classExpression- Returns:
- the value
-
getValues
@NonNull public List<Expression> getValues()
-
-