Class

fabric

Num

Related Doc: package fabric

Permalink

final case class Num(value: BigDecimal) extends AnyVal with Value with Product with Serializable

Num represents a numeric value and wraps a BigDecimal

Linear Supertypes
Serializable, Serializable, Product, Equals, Value, AnyVal, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Num
  2. Serializable
  3. Serializable
  4. Product
  5. Equals
  6. Value
  7. AnyVal
  8. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new Num(value: BigDecimal)

    Permalink

Value Members

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

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

    Permalink
    Definition Classes
    Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    Any
  4. final def apply(path: Path): Value

    Permalink

    Looks up a Value based on Path

    Looks up a Value based on Path

    Example: val v = someValue("first" \ "second" \ "third")

    Definition Classes
    Value
  5. final def apply(lookup: String): Value

    Permalink

    Looks up a Value by name in the children.

    Looks up a Value by name in the children.

    Throws an exception if invoked on anything except Obj

    Definition Classes
    Value
  6. def asArr: Arr

    Permalink

    Casts to Arr or throws an exception if not an Arr

    Casts to Arr or throws an exception if not an Arr

    Definition Classes
    Value
  7. def asBigDecimal: BigDecimal

    Permalink
  8. def asBigInt: BigInt

    Permalink
  9. def asBool: Bool

    Permalink

    Casts to Bool or throws an exception if not a Bool

    Casts to Bool or throws an exception if not a Bool

    Definition Classes
    Value
  10. def asDouble: Double

    Permalink
  11. def asFloat: Float

    Permalink
  12. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  13. def asInt: Int

    Permalink
  14. def asLong: Long

    Permalink
  15. def asNum: Num

    Permalink

    Casts to Num or throws an exception if not a Num

    Casts to Num or throws an exception if not a Num

    Definition Classes
    Value
  16. def asObj: Obj

    Permalink

    Casts to Obj or throws an exception if not an Obj

    Casts to Obj or throws an exception if not an Obj

    Definition Classes
    Value
  17. def asShort: Short

    Permalink
  18. def asStr: Str

    Permalink

    Casts to Str or throws an exception if not a Str

    Casts to Str or throws an exception if not a Str

    Definition Classes
    Value
  19. def asValue[V <: Value](type: ValueType): V

    Permalink

    Safely casts this Value as the specified ValueType.

    Safely casts this Value as the specified ValueType. Throws an exception if not a match.

    V

    the return type

    Definition Classes
    Value
  20. final def get(path: Path): Option[Value]

    Permalink

    Looks up a Value based on Path

    Looks up a Value based on Path

    Example: val o: Option[Value] = someValue("first" \ "second" \ "third")

    Definition Classes
    Value
  21. final def get(lookup: String): Option[Value]

    Permalink

    Looks up a Value by name in the children.

    Looks up a Value by name in the children.

    Definition Classes
    Value
  22. def getClass(): Class[_ <: AnyVal]

    Permalink
    Definition Classes
    AnyVal → Any
  23. final def getOrCreate(lookup: String): Value

    Permalink

    Looks up a Value by name in the children or creates a new Obj if it doesn't exist.

    Looks up a Value by name in the children or creates a new Obj if it doesn't exist.

    Definition Classes
    Value
  24. def isArr: Boolean

    Permalink

    True if this is an Arr

    True if this is an Arr

    Definition Classes
    Value
  25. def isBool: Boolean

    Permalink

    True if this is a Bool

    True if this is a Bool

    Definition Classes
    Value
  26. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  27. def isNull: Boolean

    Permalink

    True if this is a Null

    True if this is a Null

    Definition Classes
    Value
  28. def isNum: Boolean

    Permalink

    True if this is a Num

    True if this is a Num

    Definition Classes
    Value
  29. def isObj: Boolean

    Permalink

    True if this is an Obj

    True if this is an Obj

    Definition Classes
    Value
  30. def isStr: Boolean

    Permalink

    True if this is a Str

    True if this is a Str

    Definition Classes
    Value
  31. def merge(value: Value, path: Path = Path.empty, type: MergeType = MergeType.Overwrite): Value

    Permalink

    Merges a Value at the specified path

    Merges a Value at the specified path

    value

    the value to merge

    path

    the path (defaults to Path.empty)

    returns

    root Value after merge

    Definition Classes
    Value
  32. def modify(path: Path)(f: (Value) ⇒ Value): Value

    Permalink

    Modifies the value at the specified path and returns back a new root Value with the modified path.

    Modifies the value at the specified path and returns back a new root Value with the modified path.

    Note: We use the term "modify" here from an immutable standpoint. The original Value will not change.

    path

    the path to modify

    f

    the function that takes the current Value and returns the modified Value

    returns

    new root Value representing the changes

    Definition Classes
    Value
  33. def remove(path: Path): Value

    Permalink

    Convenience functionality for #modify to remove the value at a specific path.

    Convenience functionality for #modify to remove the value at a specific path.

    path

    the path to remove

    returns

    new root Value representing the changes

    Definition Classes
    Value
  34. def set(path: Path, value: Value): Value

    Permalink

    Convenience functionality for #modify to set a specific value at a path.

    Convenience functionality for #modify to set a specific value at a path.

    path

    the path to replace

    value

    the new value to set

    returns

    new root Value representing the changes

    Definition Classes
    Value
  35. def toString(): String

    Permalink
    Definition Classes
    Num → Any
  36. def type: ValueType

    Permalink

    The type of value

    The type of value

    Definition Classes
    NumValue
  37. val value: BigDecimal

    Permalink

Inherited from Serializable

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from Value

Inherited from AnyVal

Inherited from Any

Ungrouped