public class

Ternary

extends SpelNodeImpl
java.lang.Object
   ↳ org.springframework.expression.spel.ast.SpelNodeImpl
     ↳ org.springframework.expression.spel.ast.Ternary

Class Overview

Represents a ternary expression, for example: "someCheck()?true:false".

Summary

[Expand]
Inherited Fields
From class org.springframework.expression.spel.ast.SpelNodeImpl
Public Constructors
Ternary(int pos, SpelNodeImpl... args)
Public Methods
TypedValue getValueInternal(ExpressionState state)
Evaluate the condition and if true evaluate the first alternative, otherwise evaluate the second alternative.
String toStringAST()
[Expand]
Inherited Methods
From class org.springframework.expression.spel.ast.SpelNodeImpl
From class java.lang.Object
From interface org.springframework.expression.spel.SpelNode

Public Constructors

public Ternary (int pos, SpelNodeImpl... args)

Public Methods

public TypedValue getValueInternal (ExpressionState state)

Evaluate the condition and if true evaluate the first alternative, otherwise evaluate the second alternative.

Parameters
state the expression state
Throws
EvaluationException if the condition does not evaluate correctly to a boolean or there is a problem executing the chosen alternative

public String toStringAST ()