final case class IfThenElse(clauses: ConstArray[Node]) extends SimplyTypedNode with Product with Serializable
A conditional expression; The clauses should be: (if then)+ else
.
The result type is taken from the first then
(i.e. the second clause).
- Source
- Node.scala
- Alphabetic
- By Inheritance
- IfThenElse
- Serializable
- Product
- Equals
- SimplyTypedNode
- Node
- Dumpable
- AnyRef
- Any
- by StringFormat
- by Ensuring
- by ArrowAssoc
- Hide All
- Show All
- Public
- Protected
Instance Constructors
- new IfThenElse(clauses: ConstArray[Node])
Type Members
- type Self = IfThenElse
- Definition Classes
- IfThenElse → SimplyTypedNode → Node
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- def ->[B](y: B): (IfThenElse, B)
- Implicit
- This member is added by an implicit conversion from IfThenElse toArrowAssoc[IfThenElse] performed by method ArrowAssoc in scala.Predef.
- Definition Classes
- ArrowAssoc
- Annotations
- @inline()
- final def :@(newType: Type): Self
Return this Node with a Type assigned (if no other type has been seen for it yet) or a typed copy.
Return this Node with a Type assigned (if no other type has been seen for it yet) or a typed copy.
- Definition Classes
- Node
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def buildCopy: Self
Build a copy of this node with the current children.
Build a copy of this node with the current children.
- Attributes
- protected[this]
- Definition Classes
- Node
- def buildType: Type
- Attributes
- protected
- Definition Classes
- IfThenElse → SimplyTypedNode
- def childNames: IndexedSeq[String]
Names for the child nodes to show in AST dumps.
Names for the child nodes to show in AST dumps. Defaults to a numbered sequence starting at 0 but can be overridden by subclasses to produce more suitable names.
- Definition Classes
- IfThenElse → Node
- def children: ConstArray[Node]
All child nodes of this node.
All child nodes of this node. Must be implemented by subclasses.
- Definition Classes
- IfThenElse → Node
- def childrenForeach[R](f: (Node) => R): Unit
Apply a side-effecting function to all direct children from left to right.
Apply a side-effecting function to all direct children from left to right. Note that
n.childrenForeach(f)
is equivalent to
n.children.foreach(f)
but can be implemented more efficiently in
Node
subclasses.- Definition Classes
- Node
- val clauses: ConstArray[Node]
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native() @HotSpotIntrinsicCandidate()
- def elseClause: Node
- def ensuring(cond: (IfThenElse) => Boolean, msg: => Any): IfThenElse
- Implicit
- This member is added by an implicit conversion from IfThenElse toEnsuring[IfThenElse] performed by method Ensuring in scala.Predef.
- Definition Classes
- Ensuring
- def ensuring(cond: (IfThenElse) => Boolean): IfThenElse
- Implicit
- This member is added by an implicit conversion from IfThenElse toEnsuring[IfThenElse] performed by method Ensuring in scala.Predef.
- Definition Classes
- Ensuring
- def ensuring(cond: Boolean, msg: => Any): IfThenElse
- Implicit
- This member is added by an implicit conversion from IfThenElse toEnsuring[IfThenElse] performed by method Ensuring in scala.Predef.
- Definition Classes
- Ensuring
- def ensuring(cond: Boolean): IfThenElse
- Implicit
- This member is added by an implicit conversion from IfThenElse toEnsuring[IfThenElse] performed by method Ensuring in scala.Predef.
- Definition Classes
- Ensuring
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- def getDumpInfo: DumpInfo
Return the name, main info, attribute info and named children
Return the name, main info, attribute info and named children
- Definition Classes
- IfThenElse → Node → Dumpable
- def hasType: Boolean
Check if this node has a type without marking the type as seen.
Check if this node has a type without marking the type as seen.
- Definition Classes
- Node
- def ifThenClauses: Iterator[(Node, Node)]
- final def infer(scope: Scope = Map.empty, typeChildren: Boolean = false): Self
Rebuild this node and all children with their computed type.
Rebuild this node and all children with their computed type. If this node already has a type, the children are only type-checked again if
is true. iftypeChildren
is also true, the existing type of this node is replaced. If this node does not yet have a type, the types of all children are computed first.retype
- Definition Classes
- Node
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def mapChildren(f: (Node) => Node, keepType: Boolean = false): Self
Apply a mapping function to all children of this node and recreate the node with the new children.
Apply a mapping function to all children of this node and recreate the node with the new children. If all new children are identical to the old ones, this node is returned. If
is true, the type of this node is kept even when the children have changed.keepType
- Definition Classes
- Node
- def mapConditionClauses(f: (Node) => Node, keepType: Boolean = false): IfThenElse
- def mapResultClauses(f: (Node) => Node, keepType: Boolean = false): IfThenElse
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def nodeType: Type
The current type of this node.
The current type of this node.
- Definition Classes
- Node
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- def peekType: Type
Get the current type of this node for debug output without marking it as seen.
Get the current type of this node for debug output without marking it as seen.
- Attributes
- protected[this]
- Definition Classes
- Node
- def productElementNames: Iterator[String]
- Definition Classes
- Product
- def rebuild(ch: ConstArray[Node]): Self
Rebuild this node with a new list of children.
Rebuild this node with a new list of children. Implementations of this method must not reuse the current node. This method always returns a fresh copy.
- Attributes
- protected[this]
- Definition Classes
- IfThenElse → Node
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- final def toString(): String
- Definition Classes
- Node → AnyRef → Any
- final def untyped: Self
Return this Node with no Type assigned (if it has not yet been observed) or an untyped copy.
Return this Node with no Type assigned (if it has not yet been observed) or an untyped copy.
- Definition Classes
- Node
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def withChildren(ch2: ConstArray[Node]): Self
Rebuild this node with new child nodes unless all children are identical to the current ones, in which case this node is returned.
Rebuild this node with new child nodes unless all children are identical to the current ones, in which case this node is returned.
- Definition Classes
- Node
- final def withInferredType(scope: Scope, typeChildren: Boolean): Self
- Definition Classes
- SimplyTypedNode → Node
Deprecated Value Members
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable]) @Deprecated
- Deprecated
- def formatted(fmtstr: String): String
- Implicit
- This member is added by an implicit conversion from IfThenElse toStringFormat[IfThenElse] performed by method StringFormat in scala.Predef.
- Definition Classes
- StringFormat
- Annotations
- @deprecated @inline()
- Deprecated
(Since version 2.12.16) Use
formatString.format(value)
instead ofvalue.formatted(formatString)
, or use thef""
string interpolator. In Java 15 and later,formatted
resolves to the new method in String which has reversed parameters.
- def →[B](y: B): (IfThenElse, B)
- Implicit
- This member is added by an implicit conversion from IfThenElse toArrowAssoc[IfThenElse] performed by method ArrowAssoc in scala.Predef.
- Definition Classes
- ArrowAssoc
- Annotations
- @deprecated
- Deprecated
(Since version 2.13.0) Use
->
instead. If you still wish to display it as one character, consider using a font with programming ligatures such as Fira Code.
edit this text on github
Scala Language-Integrated Connection Kit
This is the API documentation for the Slick database library. It should be used as an additional resource to the user manual.
Further documentation for Slick can be found on the documentation pages.
To the slick package list...