public class WhenStatement
extends java.lang.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(java.lang.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() |
java.lang.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 allowedpublic Restriction getCondition()
Restriction
objectpublic Expression getValue()
Expression
objectpublic java.lang.String toString()
toString
in class java.lang.Object
public boolean equals(java.lang.Object other)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object