Utils

object Utils

Module that contains some utils useful with types and collections.

class Object
trait Matchable
class Any
Utils.type

Extensions

Extensions

extension [A](elem: A)
def andIf(f: A => Boolean)(update: A => A)(implicit evidence$5: ClassTag[A]): A

Express a computation to perform on element only if a condition on that element is satisfied.

Express a computation to perform on element only if a condition on that element is satisfied.

Value parameters:
f

the condition on the element

update

the function to apply if f is true

def withCapabilities[T : ClassTag]: Option[T]

Try to obtain the element with the specified T capabilities. It returns an Option

Try to obtain the element with the specified T capabilities. It returns an Option

extension [A](set: Set[A])
def select[T : ClassTag]: Set[T]

Select the elements from the set that are of the specified type T.

Select the elements from the set that are of the specified type T.