Trait/Object

fabric

Value

Related Docs: object Value | package fabric

Permalink

sealed trait Value extends Any

Value represents the base sealed trait for all representable types in fabric.

Linear Supertypes
Any
Known Subclasses
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Value
  2. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Type Members

  1. abstract type Type

    Permalink

Abstract Value Members

  1. abstract def getClass(): Class[_]

    Permalink
    Definition Classes
    Any
  2. abstract def isEmpty: Boolean

    Permalink
  3. abstract def type: ValueType[Type]

    Permalink

    The type of value

Concrete 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")

  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

  6. def asArr: Arr

    Permalink

    Casts to Arr or throws an exception if not an Arr

  7. def asBigDecimal: BigDecimal

    Permalink

    Convenience method for asNum.value

  8. def asBool: Bool

    Permalink

    Casts to Bool or throws an exception if not a Bool

  9. def asBoolean: Boolean

    Permalink

    Convenience method for asBool.value

  10. def asByte: Byte

    Permalink
  11. def asDouble: Double

    Permalink
  12. def asFloat: Float

    Permalink
  13. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  14. def asInt: Int

    Permalink
  15. def asLong: Long

    Permalink
  16. def asMap: Map[String, Value]

    Permalink

    Convenience method for asObj.value

  17. def asNum: Num

    Permalink

    Casts to Num or throws an exception if not a Num

  18. def asObj: Obj

    Permalink

    Casts to Obj or throws an exception if not an Obj

  19. def asShort: Short

    Permalink
  20. def asStr: Str

    Permalink

    Casts to Str or throws an exception if not a Str

  21. def asString: String

    Permalink

    Convenience method for asStr.value

  22. final def asValue[V <: Value](type: ValueType[V]): 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

  23. def asVector: Vector[Value]

    Permalink

    Convenience method for asArr.value

  24. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    Any
  25. 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")

  26. final def get(lookup: String): Option[Value]

    Permalink

    Looks up a Value by name in the children.

  27. def getArr: Option[Arr]

    Permalink

    Casts to Arr if it's of Arr type or returns None

  28. def getBigDecimal: Option[BigDecimal]

    Permalink

    Convenience method for getNum.map(_.value)

  29. def getBool: Option[Bool]

    Permalink

    Casts to Bool if it's of Bool type or returns None

  30. def getBoolean: Option[Boolean]

    Permalink

    Convenience method for getBool.map(_.value)

  31. def getByte: Option[Byte]

    Permalink
  32. def getDouble: Option[Double]

    Permalink
  33. def getFloat: Option[Float]

    Permalink
  34. def getInt: Option[Int]

    Permalink
  35. def getLong: Option[Long]

    Permalink
  36. def getMap: Option[Map[String, Value]]

    Permalink

    Convenience method for getObj.map(_.value)

  37. def getNum: Option[Num]

    Permalink

    Casts to Num if it's of Num type or returns None

  38. def getObj: Option[Obj]

    Permalink

    Casts to Obj if it's of Obj type or returns None

  39. 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.

  40. def getShort: Option[Short]

    Permalink
  41. def getStr: Option[Str]

    Permalink

    Casts to Str if it's of Str type or returns None

  42. def getString: Option[String]

    Permalink

    Convenience method for getStr.map(_.value)

  43. final def getValue[V <: Value](type: ValueType[V]): Option[V]

    Permalink

    Safely casts this Value as the specified ValueType.

    Safely casts this Value as the specified ValueType. Returns None if it's a different type.

    V

    the value type

    returns

    Option[V]

  44. def getVector: Option[Vector[Value]]

    Permalink

    Convenience method for getArr.map(_.value)

  45. def hashCode(): Int

    Permalink
    Definition Classes
    Any
  46. def isArr: Boolean

    Permalink

    True if this is an Arr

  47. def isBool: Boolean

    Permalink

    True if this is a Bool

  48. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  49. def isNull: Boolean

    Permalink

    True if this is a Null

  50. def isNum: Boolean

    Permalink

    True if this is a Num

  51. def isObj: Boolean

    Permalink

    True if this is an Obj

  52. def isStr: Boolean

    Permalink

    True if this is a Str

  53. 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

  54. 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

  55. def nonEmpty: Boolean

    Permalink
  56. 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

  57. 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

  58. def toString(): String

    Permalink
    Definition Classes
    Any

Inherited from Any

Ungrouped