Package org.apache.calcite.linq4j.tree
Class ConditionalStatement
- java.lang.Object
-
- org.apache.calcite.linq4j.tree.AbstractNode
-
- org.apache.calcite.linq4j.tree.Statement
-
- org.apache.calcite.linq4j.tree.ConditionalStatement
-
- All Implemented Interfaces:
Node
public class ConditionalStatement extends Statement
Represents an expression that has a conditional operator.With an odd number of expressions {c0, e0, c1, e1, ..., cn-1, en-1, en} represents "if (c0) e0 else if (c1) e1 ... else en"; with an even number of expressions {c0, e0, c1, e1, ..., cn-1, en-1} represents "if (c0) e0 else if (c1) e1 ... else if (cn-1) en-1".
-
-
Field Summary
Fields Modifier and Type Field Description java.util.List<Node>
expressionList
-
Fields inherited from class org.apache.calcite.linq4j.tree.AbstractNode
nodeType, type
-
-
Constructor Summary
Constructors Constructor Description ConditionalStatement(java.util.List<Node> expressionList)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Statement
accept(Shuttle shuttle)
<R> R
accept(Visitor<R> visitor)
(package private) void
accept0(ExpressionWriter writer)
boolean
equals(java.lang.Object o)
int
hashCode()
private static <E> E
last(java.util.List<E> collection)
-
Methods inherited from class org.apache.calcite.linq4j.tree.AbstractNode
accept, evaluate, getNodeType, getType, toString
-
-
-
-
Field Detail
-
expressionList
public final java.util.List<Node> expressionList
-
-
Constructor Detail
-
ConditionalStatement
public ConditionalStatement(java.util.List<Node> expressionList)
-
-
Method Detail
-
accept
public <R> R accept(Visitor<R> visitor)
-
accept0
void accept0(ExpressionWriter writer)
- Overrides:
accept0
in classAbstractNode
-
last
private static <E> E last(java.util.List<E> collection)
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classAbstractNode
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classAbstractNode
-
-