org.springframework.expression.spel.ast
Class Selection
java.lang.Object
org.springframework.expression.spel.ast.SpelNodeImpl
org.springframework.expression.spel.ast.Selection
- All Implemented Interfaces:
- SpelNode
public class Selection
- extends SpelNodeImpl
Represents selection over a map or collection.
For example: {1,2,3,4,5,6,7,8,9,10}.?{#isEven(#this) == 'y'} returns [2, 4, 6, 8, 10]
Basically a subset of the input data is returned based on the
evaluation of the expression supplied as selection criteria.
- Since:
- 3.0
- Author:
- Andy Clement, Mark Fisher, Sam Brannen
Field Summary |
static int |
ALL
|
static int |
FIRST
|
static int |
LAST
|
Methods inherited from class org.springframework.expression.spel.ast.SpelNodeImpl |
getChild, getChildCount, getEndPosition, getObjectClass, getPreviousChild, getStartPosition, getTypedValue, getValue, getValue, isWritable, nextChildIs, setValue |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ALL
public static final int ALL
- See Also:
- Constant Field Values
FIRST
public static final int FIRST
- See Also:
- Constant Field Values
LAST
public static final int LAST
- See Also:
- Constant Field Values
Selection
public Selection(boolean nullSafe,
int variant,
int pos,
SpelNodeImpl expression)
getValueInternal
public TypedValue getValueInternal(ExpressionState state)
throws EvaluationException
- Specified by:
getValueInternal
in class SpelNodeImpl
- Throws:
EvaluationException
toStringAST
public String toStringAST()
- Specified by:
toStringAST
in interface SpelNode
- Specified by:
toStringAST
in class SpelNodeImpl
- Returns:
- the string form of this AST node