public class WhenStatement extends Object
CaseExpression
.Expressions.caseWhen(Expression, WhenStatement[])
Modifier and Type | Field and Description |
---|---|
private Restriction |
condition |
private Expression |
value |
Constructor and Description |
---|
WhenStatement(Restriction condition,
Expression value)
Create a new
WhenStatement |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object other)
This statement is equal to another WhenStatement if both
have equal conditions and values.
|
Restriction |
getCondition()
Get the condition of this statement.
|
Expression |
getValue()
Get the value returned by this statement
|
int |
hashCode() |
String |
toString() |
private final Restriction condition
private final Expression value
public WhenStatement(Restriction condition, Expression value)
WhenStatement
condition
- The condition that is controlling if this
value is returned or not, null is not allowedvalue
- The value to return if the condition is TRUE,
null is not allowedpublic Restriction getCondition()
Restriction
objectpublic Expression getValue()
Expression
objectpublic boolean equals(Object other)