implicit class BooleanSyntax extends AnyRef
Syntax for treating booleans as indicators of success or failure in a computation.
The simplest usage is something like: myBoolean ~>? "Is my boolean true?". The 'value'
and log tree of the returned treelog.LogTreeSyntax.DescribedComputation will indicate success or failure
depending on the value of myBoolean.
- Alphabetic
- By Inheritance
- BooleanSyntax
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
- new BooleanSyntax(b: Boolean)
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate() @throws( ... )
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
def
~>?(failureDescription: ⇒ String, successDescription: ⇒ String): DescribedComputation[Boolean]
Use different descriptions for the
trueandfalsecases.Use different descriptions for the
trueandfalsecases. Note that unlike'if'thefalse/ failure description is the first parameter and thetrue/ success description is the second parameter. This is to maintain consistency with OptionSyntax and EitherSyntax.If the boolean is
truethe 'value' of the returned DescribedComputation will be\/-(true), otherwise, the 'value' will be-\/(description). -
def
~>?(description: String): DescribedComputation[Boolean]
Use the same description whether the boolean is
trueorfalse.Use the same description whether the boolean is
trueorfalse. Equivalent to~>?(description, description)