# Conditional

### Related Doc: package algebra

#### case class Conditional(condition: Expression, thenClause: Expression, elseClause: Expression) extends Expression with Product with Serializable

Representation of an If-Then-Else block. Note that this differs from SQL's use of CASE blocks. If-Then-Else is substantially easier to work with for recursive analyses.

For conversion between If-Then-Else and CASE semantics, see the methods

• makeCaseExpression
• foldConditionalsToCase in mimir.algebra.ExpressionUtils.
Annotations
@SerialVersionUID()
Linear Supertypes
Serializable, Serializable, Product, Equals, Expression, ExpressionConstructors, AnyRef, Any
Ordering
1. Alphabetic
2. By Inheritance
Inherited
1. Conditional
2. Serializable
3. Serializable
4. Product
5. Equals
6. Expression
7. ExpressionConstructors
8. AnyRef
9. Any
1. Hide All
2. Show All
Visibility
1. Public
2. All

### Value Members

1. #### final def !=(arg0: Any): Boolean

Definition Classes
AnyRef → Any
2. #### final def ##(): Int

Definition Classes
AnyRef → Any
3. #### final def ==(arg0: Any): Boolean

Definition Classes
AnyRef → Any
4. #### def add(other: Expression): Expression

Definition Classes
ExpressionConstructors
5. #### def and(other: Expression): Expression

Definition Classes
ExpressionConstructors
6. #### final def asInstanceOf[T0]: T0

Definition Classes
Any
7. #### def bitAnd(other: Expression): Expression

Definition Classes
ExpressionConstructors
8. #### def bitOr(other: Expression): Expression

Definition Classes
ExpressionConstructors
9. #### def children: List[Expression]

Return all of the children of the current tree node

Return all of the children of the current tree node

Definition Classes
ConditionalExpression
10. #### def clone(): AnyRef

Attributes
protected[java.lang]
Definition Classes
AnyRef
Annotations
@throws( ... )

12. #### def div(other: Expression): Expression

Definition Classes
ExpressionConstructors

14. #### def eq(other: Expression): Expression

Definition Classes
ExpressionConstructors
15. #### def eq(other: Double): Expression

Definition Classes
ExpressionConstructors
16. #### def eq(other: Int): Expression

Definition Classes
ExpressionConstructors
17. #### def eq(other: String): Expression

Definition Classes
ExpressionConstructors
18. #### final def eq(arg0: AnyRef): Boolean

Definition Classes
AnyRef
19. #### def finalize(): Unit

Attributes
protected[java.lang]
Definition Classes
AnyRef
Annotations
@throws( classOf[java.lang.Throwable] )
20. #### final def getClass(): Class[_]

Definition Classes
AnyRef → Any
21. #### def gt(other: Expression): Expression

Definition Classes
ExpressionConstructors
22. #### def gt(other: Double): Expression

Definition Classes
ExpressionConstructors
23. #### def gt(other: Long): Expression

Definition Classes
ExpressionConstructors
24. #### def gte(other: Expression): Expression

Definition Classes
ExpressionConstructors
25. #### def gte(other: Double): Expression

Definition Classes
ExpressionConstructors
26. #### def gte(other: Long): Expression

Definition Classes
ExpressionConstructors
27. #### def in(other: Seq[Expression]): Expression

Definition Classes
ExpressionConstructors
28. #### final def isInstanceOf[T0]: Boolean

Definition Classes
Any
29. #### def isNull: Expression

Definition Classes
ExpressionConstructors
30. #### def lt(other: Expression): Expression

Definition Classes
ExpressionConstructors
31. #### def lt(other: Double): Expression

Definition Classes
ExpressionConstructors
32. #### def lt(other: Long): Expression

Definition Classes
ExpressionConstructors
33. #### def lte(other: Expression): Expression

Definition Classes
ExpressionConstructors
34. #### def lte(other: Double): Expression

Definition Classes
ExpressionConstructors
35. #### def lte(other: Long): Expression

Definition Classes
ExpressionConstructors
36. #### def mult(other: Expression): Expression

Definition Classes
ExpressionConstructors
37. #### final def ne(arg0: AnyRef): Boolean

Definition Classes
AnyRef
38. #### def neq(other: Expression): Expression

Definition Classes
ExpressionConstructors
39. #### def neq(other: Double): Expression

Definition Classes
ExpressionConstructors
40. #### def neq(other: Int): Expression

Definition Classes
ExpressionConstructors
41. #### def neq(other: String): Expression

Definition Classes
ExpressionConstructors
42. #### def not: Expression

Definition Classes
ExpressionConstructors
43. #### final def notify(): Unit

Definition Classes
AnyRef
44. #### final def notifyAll(): Unit

Definition Classes
AnyRef
45. #### def or(other: Expression): Expression

Definition Classes
ExpressionConstructors
46. #### def rebuild(c: Seq[Expression]): Conditional

Return a new instance of the same object, but with the children replaced with the provided list.

Return a new instance of the same object, but with the children replaced with the provided list. The list must be of the same size returned by children. This is mostly to facilitate recur, below

Definition Classes
ConditionalExpression
47. #### def recur(f: (Expression) ⇒ Expression): Expression

Perform a recursive rewrite.

Perform a recursive rewrite. The following pattern is pretty common throughout Mimir: def replaceFooWithBar(e:Expression): Expression = e match { case Foo(a, b, c, ...) => Bar(a, b, c, ...) case _ => e.recur(replaceFooWithBar(_)) } Note how specific rewrites are applied to specific patterns in the tree, and recur is used to ignore/descend through every other class of object

Definition Classes
Expression
48. #### def shiftLeft(other: Expression): Expression

Definition Classes
ExpressionConstructors
49. #### def shiftRight(other: Expression): Expression

Definition Classes
ExpressionConstructors
50. #### def sub(other: Expression): Expression

Definition Classes
ExpressionConstructors
51. #### final def synchronized[T0](arg0: ⇒ T0): T0

Definition Classes
AnyRef

53. #### def thenElse(thenClause: Expression)(elseClause: Expression): Expression

Definition Classes
ExpressionConstructors
54. #### def toExpression: Expression

Return this

Return this

Definition Classes
ExpressionExpressionConstructors
55. #### def toString(): String

Definition Classes
Conditional → AnyRef → Any
56. #### final def wait(): Unit

Definition Classes
AnyRef
Annotations
@throws( ... )
57. #### final def wait(arg0: Long, arg1: Int): Unit

Definition Classes
AnyRef
Annotations
@throws( ... )
58. #### final def wait(arg0: Long): Unit

Definition Classes
AnyRef
Annotations
@throws( ... )