AnyRefTypeExtensions

class AnyRefTypeExtensions[A <: AnyRef](thisA: A)

Extension methods for Any type A.

class Object
trait Matchable
class Any

Value members

Concrete methods

def ifMod(b: Boolean, fTrue: A => A): A

If the condition is true apply the function to this value of type A and return a modified type A else return thisA unmodified.

If the condition is true apply the function to this value of type A and return a modified type A else return thisA unmodified.

def ifNotMod(b: Boolean, fTrue: A => A): A

If the condition is true thisA unmodified else apply the function to this value of type A and return a modified value of type A.

If the condition is true thisA unmodified else apply the function to this value of type A and return a modified value of type A.

def match2[B](f1: A => Boolean, v1: => B, v2: => B): B

Short hand alternative to a 2 case match statement.

Short hand alternative to a 2 case match statement.

def match3[B](f1: A => Boolean, v1: => B, f2: A => Boolean, v2: => B, v3: => B): B

Short hand alternative to a 3 case match statement.

Short hand alternative to a 3 case match statement.