public class

Elvis

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

Class Overview

Represents the elvis operator ?:. For an expression "a?:b" if a is not null, the value of the expression is "a", if a is null then the value of the expression is "b".

Summary

[Expand]
Inherited Fields
From class org.springframework.expression.spel.ast.SpelNodeImpl
Public Constructors
Elvis(int pos, SpelNodeImpl... args)
Public Methods
TypedValue getValueInternal(ExpressionState state)
Evaluate the condition and if not null, return it.
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 Elvis (int pos, SpelNodeImpl... args)

Public Methods

public TypedValue getValueInternal (ExpressionState state)

Evaluate the condition and if not null, return it. If it is null return the other value.

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 ()