Property

case class Property[T](value: () => Option[T], evaluated: Boolean, evaluatedValue: Option[T])

This class represents values which are evaluated lazily and which may even be missing.

It has Option-like function and can be also converted to an Either object

Companion:
object
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any

Value members

Concrete methods

def apply(newValue: => T): Property[T]

alias for update

alias for update

override def equals(other: Any): Boolean
Definition Classes
Equals -> Any
def filter(p: T => Boolean): Property[T]

return the property with the value being filtered according to a predicate

return the property with the value being filtered according to a predicate

def flatMap[U](f: T => Option[U]): Property[U]

option-like flatMap

option-like flatMap

def foreach(f: T => Unit): Unit

option-like foreach

option-like foreach

def getOrElse[U >: T](other: U): U

option-like getOrElse

option-like getOrElse

override def hashCode: Int
Definition Classes
Any
def isDefined: Boolean

option-like isDefined

option-like isDefined

def isEmpty: Boolean

option-like isEmpty

option-like isEmpty

def iterator: Iterator[T]
Returns:

an iterator containing the value if present

def map[U](f: T => U): Property[U]

option-like map

option-like map

def optionalValue: Option[T]
Returns:

the option(value)

def orElse[U >: T](other: => Property[U]): Property[U]

option-like orElse

option-like orElse

def toLeft[R](right: R): Either[T, R]

option-like toLeft

option-like toLeft

def toList: List[T]

to a list

to a list

def toOption: Option[T]

alias for optionalValue

alias for optionalValue

def toRight[L](left: L): Either[L, T]

option-like toRight

option-like toRight

override def toString: String
Definition Classes
Any
def update(newValue: => T): Property[T]

update the value

update the value

def updateValue(init: => Option[T]): Property[T]

change the value

change the value

def withValue(init: => T): Property[T]

change the value

change the value

Inherited methods

def productElementNames: Iterator[String]
Inherited from:
Product
def productIterator: Iterator[Any]
Inherited from:
Product