BooleanExtensions

ostrat.BooleanExtensions
final class BooleanExtensions(val thisBool: Boolean) extends AnyVal

Attributes

Graph
Supertypes
class AnyVal
trait Matchable
class Any

Members list

Value members

Concrete methods

def errFlatMap[A](fp: TextPosn, errStr: String, ifTrue: => EMon[A]): EMon[A]
def errMap[A](fp: TextPosn, errStr: String, ifTrue: => A): EMon[A]
def fold[A](ifTrue: => A, ifFalse: => A): A

Folds the Boolean, a safer and more functional alternative to using an if else statement

Folds the Boolean, a safer and more functional alternative to using an if else statement

Attributes

def ifDo(f: => Unit): Unit

A safer alternative to using an "if" without an else

A safer alternative to using an "if" without an else

Attributes

def ifElse(ifProcedure: => Unit)(elseProcedure: => Unit): Unit

A safer alternative to using an if-else statement

A safer alternative to using an if-else statement

Attributes

def ifMod[A](value: A)(fMod: A => A): A

if this Boolean is true modifies the value by applying the function ifMod to it else returns the value unmodified

if this Boolean is true modifies the value by applying the function ifMod to it else returns the value unmodified

Attributes

def ifNotStr(optionalString: String): String

Returns the the empty string if true, returns String parameter if false

Returns the the empty string if true, returns String parameter if false

Attributes

def ifSeq[A](trueSeq: => Seq[A]): Seq[A]
def ifSeq1[A](trueElem: => A): Seq[A]

This needs to be changed to by name parameters when by name varargs are allowed. I think this is coming in 12.3

This needs to be changed to by name parameters when by name varargs are allowed. I think this is coming in 12.3

Attributes

def ifStr(optionalString: String): String

Returns the String parameter if true, returns the empty string if false

Returns the String parameter if true, returns the empty string if false

Attributes

def toOption[A](obj: A): Option[A]
def |!&(operand: Boolean): Boolean

Concrete fields