AnyRefTypeExtensions

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

Extension methods for Any type A.

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any

Members list

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.

Attributes

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.

Attributes

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.

Attributes

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.

Attributes