public class Nth extends Object implements ValueExpression
ValueExpression that returns an indexed list of Values.
The Nth ValueExpression has two operands, values and
indices (both ValueExpressions). Both operands are
evaluated. Next, the resulting values of evaluating indices is
used as a list of integer indices into the results of evaluating
values. For every invalid index (such as
Optional.empty(), a negative value or an index that is out of
bounds) empty is returned.
| Modifier and Type | Field and Description |
|---|---|
ValueExpression |
indices |
ValueExpression |
values |
| Constructor and Description |
|---|
Nth(ValueExpression values,
ValueExpression indices) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj) |
ImmutableList<Optional<Value>> |
eval(ParseState parseState,
Encoding encoding) |
int |
hashCode() |
String |
toString() |
public final ValueExpression values
public final ValueExpression indices
public Nth(ValueExpression values, ValueExpression indices)
public ImmutableList<Optional<Value>> eval(ParseState parseState, Encoding encoding)
eval in interface ValueExpressionCopyright © 2017. All rights reserved.