Trait/Object

framian

Cell

Related Docs: object Cell | package framian

Permalink

sealed trait Cell[+A] extends AnyRef

A Cell represents a single piece of data that may not be available or meangingful in a given context.

Essentially, a Cell is similar to Option, except instead of None we have 2 representations of NonValue, the absence of data: NA (Not Available) and NM (Not Meaningful).

A

the value type contain in the cell

Source
Cell.scala
See also

Value NonValue NA NM

Linear Supertypes
Known Subclasses
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Cell
  2. AnyRef
  3. Any
Implicitly
  1. by any2stringadd
  2. by StringFormat
  3. by Ensuring
  4. by ArrowAssoc
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Abstract Value Members

  1. abstract def get: A

    Permalink

    Return the Cell's value.

    Return the Cell's value.

    Exceptions thrown

    NoSuchElementException if the value is unavailable or not meaningful.

    Note

    The Cell's value must be both available and meaningful.

  2. abstract def isValue: Boolean

    Permalink

    Returns true if this Cell is a value that is available and meaningful.

    Returns true if this Cell is a value that is available and meaningful.

    returns

    true if this Cell is a value that is available and meaningful.

    See also

    Value

  3. abstract def value: Option[A]

    Permalink

    Project this Cell to an Option

    Project this Cell to an Option

    returns

    Some of the value or None for non values

  4. abstract def valueString: String

    Permalink

    Returns the contents of the Cell as a String

    Returns the contents of the Cell as a String

    returns

    the content of the Cell as a String.

    Note

    NA.valueString == "NA"
    NA.valueString == "NM"
    Value(1D).valueString == "1.0"
    NA.toString == "NA"
    NM.toString == "NM"
    Value(1D).toString == "Value(1.0)"

Concrete Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. def +(other: String): String

    Permalink
    Implicit information
    This member is added by an implicit conversion from Cell[A] to any2stringadd[Cell[A]] performed by method any2stringadd in scala.Predef.
    Definition Classes
    any2stringadd
  4. def ->[B](y: B): (Cell[A], B)

    Permalink
    Implicit information
    This member is added by an implicit conversion from Cell[A] to ArrowAssoc[Cell[A]] performed by method ArrowAssoc in scala.Predef.
    Definition Classes
    ArrowAssoc
    Annotations
    @inline()
  5. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  6. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  7. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  8. final def collect[B](pf: PartialFunction[A, B]): Cell[B]

    Permalink

    Returns a Value containing the result of appling pf to this Cell's value if it is available and meaningful and pf is defined for that value.

    Returns a Value containing the result of appling pf to this Cell's value if it is available and meaningful and pf is defined for that value. Otherwise return NA, unless this Cell is NM.

    pf

    the partial function to apply to a value that is available and meaningful.

    Annotations
    @inline()
    See also

    filterNot

    filter

  9. def ensuring(cond: (Cell[A]) ⇒ Boolean, msg: ⇒ Any): Cell[A]

    Permalink
    Implicit information
    This member is added by an implicit conversion from Cell[A] to Ensuring[Cell[A]] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  10. def ensuring(cond: (Cell[A]) ⇒ Boolean): Cell[A]

    Permalink
    Implicit information
    This member is added by an implicit conversion from Cell[A] to Ensuring[Cell[A]] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  11. def ensuring(cond: Boolean, msg: ⇒ Any): Cell[A]

    Permalink
    Implicit information
    This member is added by an implicit conversion from Cell[A] to Ensuring[Cell[A]] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  12. def ensuring(cond: Boolean): Cell[A]

    Permalink
    Implicit information
    This member is added by an implicit conversion from Cell[A] to Ensuring[Cell[A]] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  13. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  14. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  15. final def exists(p: (A) ⇒ Boolean): Boolean

    Permalink

    Returns true if this Cell's value is available and meaningful and the predicate p returns true when applied to that value.

    Returns true if this Cell's value is available and meaningful and the predicate p returns true when applied to that value. Otherwise, returns false.

    p

    the predicate to test a value that is available and meaningful.

    Annotations
    @inline()
    See also

    forall

  16. final def filter(p: (A) ⇒ Boolean): Cell[A]

    Permalink

    Returns this Cell unless it contains a value that is available and meaningful and applying the predicate p to that value returns false, then return NA.

    Returns this Cell unless it contains a value that is available and meaningful and applying the predicate p to that value returns false, then return NA.

    p

    the predicate used to test a value that is available and meaningful.

    Annotations
    @inline()
    See also

    collect

    filterNot

  17. final def filterNot(p: (A) ⇒ Boolean): Cell[A]

    Permalink

    Returns this Cell unless it contains a value that is available and meaningful and applying the predicate p to that value returns true, then return NA.

    Returns this Cell unless it contains a value that is available and meaningful and applying the predicate p to that value returns true, then return NA.

    p

    the predicate to test a value that is available and meaningful.

    Annotations
    @inline()
    See also

    collect

    filter

  18. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  19. final def flatMap[B](f: (A) ⇒ Cell[B]): Cell[B]

    Permalink

    Returns the result of applying f to this Cell's value if it is available and meaningful.

    Returns the result of applying f to this Cell's value if it is available and meaningful.

    f

    the function to apply to a value that is available and meaningful.

    Annotations
    @inline()
    See also

    foreach

    map

  20. final def flatten[B](implicit ev: <:<[A, Cell[B]]): Cell[B]

    Permalink

    Flatten a nested Cell with type Cell[Cell[B]] into Cell[B].

    Flatten a nested Cell with type Cell[Cell[B]] into Cell[B].

    Annotations
    @inline()
    Note

    there must be implicit evident that A is a subtype of Cell[B].

  21. final def fold[B](na: ⇒ B, nm: ⇒ B)(f: (A) ⇒ B): B

    Permalink

    Returns the result of applying f to this Cell's value.

    Returns the result of applying f to this Cell's value. Otherwise, evaluates expression na if a value is not available, or evaluates expression nm if the value is not meaningful.

    na

    the expression to evaluate if no value is available.

    nm

    the expression to evaluate if the value in not meaningful.

    f

    the function to apply to a value that is available and meaningful.

    Annotations
    @inline()
  22. final def forall(p: (A) ⇒ Boolean): Boolean

    Permalink

    Returns true if this Cell's value is unavailable (NA) or the predicate p returns true when applied to this Cell's meaningful value.

    Returns true if this Cell's value is unavailable (NA) or the predicate p returns true when applied to this Cell's meaningful value.

    p

    the predicate to test a value that is available and meaningful.

    Annotations
    @inline()
    Note

    NA represents the vacuous case, so will result in true, but NM will result in false.

    See also

    exists

  23. final def foreach[U](f: (A) ⇒ U): Unit

    Permalink

    Apply the the given procedure f to the Cell's value if it is available and meaningful.

    Apply the the given procedure f to the Cell's value if it is available and meaningful. Otherwise, do nothing.

    f

    the procedure to apply to a value that is available and meaningful.

    Annotations
    @inline()
    See also

    flatMap

    map

  24. def formatted(fmtstr: String): String

    Permalink
    Implicit information
    This member is added by an implicit conversion from Cell[A] to StringFormat[Cell[A]] performed by method StringFormat in scala.Predef.
    Definition Classes
    StringFormat
    Annotations
    @inline()
  25. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  26. final def getOrElse[B >: A](default: ⇒ B): B

    Permalink

    Returns the Cell's value if it is available and meaningful, otherwise returns the result of evaluating expression default.

    Returns the Cell's value if it is available and meaningful, otherwise returns the result of evaluating expression default.

    default

    the default expression.

    Annotations
    @inline()
    See also

    orElse

    get

  27. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  28. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  29. final def isNonValue: Boolean

    Permalink

    Returns true if this Cell is not a value that is available and meaningful.

    Returns true if this Cell is not a value that is available and meaningful.

    returns

    true if this Cell is not a value that is available and meaningful.

    Annotations
    @inline()
    See also

    NM

    NA

    NonValue

  30. final def map[B](f: (A) ⇒ B): Cell[B]

    Permalink

    Returns a Value containing the result of applying f to this Cell's value if it is available and meaningful.

    Returns a Value containing the result of applying f to this Cell's value if it is available and meaningful.

    f

    the function to apply to a value that is available and meaningful.

    Annotations
    @inline()
    See also

    foreach

    flatMap

  31. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  32. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  33. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  34. final def orElse[B >: A](alternative: ⇒ Cell[B]): Cell[B]

    Permalink

    Returns this Cell if its value is available and meaningful, otherwise return the result of evaluating alternative.

    Returns this Cell if its value is available and meaningful, otherwise return the result of evaluating alternative.

    alternative

    the alternative expression

    Annotations
    @inline()
    See also

    getOrElse

  35. final def recover[A0 >: A](pf: PartialFunction[NonValue, A0]): Cell[A0]

    Permalink

    If this cell is a NonValue and pf is defined for it, then this will return Value(pf(this)), otherwise it will return this cell as-is.

    If this cell is a NonValue and pf is defined for it, then this will return Value(pf(this)), otherwise it will return this cell as-is.

    pf

    the partial function to map the non-value.

    See also

    recoverWith

  36. final def recoverWith[A0 >: A](pf: PartialFunction[NonValue, Cell[A0]]): Cell[A0]

    Permalink

    If this cell is a NonValue and pf is defined for it, then this will return pf(this), otherwise it will return this cell as-is.

    If this cell is a NonValue and pf is defined for it, then this will return pf(this), otherwise it will return this cell as-is.

    pf

    the partial function to map the non-value.

    See also

    recover

  37. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  38. final def toList: List[A]

    Permalink

    Returns a singleton list containing the Cell's value, or the empty list if the Cell's value is unavailable or not meaningful.

    Returns a singleton list containing the Cell's value, or the empty list if the Cell's value is unavailable or not meaningful.

    Annotations
    @inline()
  39. final def toOption: Option[A]

    Permalink

    Project this Cell to an Option

    Project this Cell to an Option

    returns

    Some of the value or None for non values

    Annotations
    @inline()
  40. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  41. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  42. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  43. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  44. def zipMap[B, C](that: Cell[B])(f: (A, B) ⇒ C): Cell[C]

    Permalink

    If both this and that are values, then this returns a value derived by applying f to the values of them.

    If both this and that are values, then this returns a value derived by applying f to the values of them. Otherwise, if either this or that is NA, then NA is returned, otherwise NM is returned.

    Annotations
    @inline()
  45. def [B](y: B): (Cell[A], B)

    Permalink
    Implicit information
    This member is added by an implicit conversion from Cell[A] to ArrowAssoc[Cell[A]] performed by method ArrowAssoc in scala.Predef.
    Definition Classes
    ArrowAssoc

Inherited from AnyRef

Inherited from Any

Inherited by implicit conversion any2stringadd from Cell[A] to any2stringadd[Cell[A]]

Inherited by implicit conversion StringFormat from Cell[A] to StringFormat[Cell[A]]

Inherited by implicit conversion Ensuring from Cell[A] to Ensuring[Cell[A]]

Inherited by implicit conversion ArrowAssoc from Cell[A] to ArrowAssoc[Cell[A]]

Ungrouped