case class NumInt(value: Long) extends Num with Product with Serializable
NumInt represents a numeric value and wraps a Long
- Alphabetic
- By Inheritance
- NumInt
- Serializable
- Serializable
- Product
- Equals
- Num
- Json
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
- new NumInt(value: Long)
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
apply(path: Path): Json
Looks up a Value based on Path
Looks up a Value based on Path
Example:
val v = someValue("first" \ "second" \ "third")
- Definition Classes
- Json
-
final
def
apply(lookup: String): Json
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
- Json
-
def
asArr: Arr
Casts to Arr or throws an exception if not an Arr
Casts to Arr or throws an exception if not an Arr
- Definition Classes
- Json
-
def
asBigDecimal: BigDecimal
Convenience method for asNum.value
- def asBigInt: BigInt
-
def
asBool: Bool
Casts to Bool or throws an exception if not a Bool
Casts to Bool or throws an exception if not a Bool
- Definition Classes
- Json
-
def
asBoolean: Boolean
Convenience method for asBool.value
Convenience method for asBool.value
- Definition Classes
- Json
- def asByte: Byte
- def asDouble: Double
- def asFloat: Float
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
- def asInt: Int
- def asLong: Long
-
def
asMap: Map[String, Json]
Convenience method for asObj.value
Convenience method for asObj.value
- Definition Classes
- Json
-
def
asNum: Num
Casts to Num or throws an exception if not a Num
Casts to Num or throws an exception if not a Num
- Definition Classes
- Json
-
def
asNumDec: NumDec
Casts to NumDec or throws an exception if not a NumDec
Casts to NumDec or throws an exception if not a NumDec
- Definition Classes
- Json
-
def
asNumInt: NumInt
Casts to NumInt or throws an exception if not a NumInt
Casts to NumInt or throws an exception if not a NumInt
- Definition Classes
- Json
-
def
asObj: Obj
Casts to Obj or throws an exception if not an Obj
Casts to Obj or throws an exception if not an Obj
- Definition Classes
- Json
- def asShort: Short
-
def
asStr: Str
Casts to Str or throws an exception if not a Str
Casts to Str or throws an exception if not a Str
- Definition Classes
- Json
-
def
asString: String
Convenience method for asStr.value
Convenience method for asStr.value
- Definition Classes
- Json
-
def
asValue[V <: Json](type: ValueType[V]): V
Safely casts this Value as the specified ValueType.
-
def
asVector: Vector[Json]
Convenience method for asArr.value
Convenience method for asArr.value
- Definition Classes
- Json
-
def
clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(obj: Any): Boolean
- Definition Classes
- NumInt → Equals → AnyRef → Any
-
def
filter(filter: ValueFilter): Option[Json]
Applies the filter recursively to this value beginning on the leafs working backward up the tree back to the root.
Applies the filter recursively to this value beginning on the leafs working backward up the tree back to the root.
- filter
the filter to apply
- returns
Option[Value]
- Definition Classes
- Json
-
def
finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
get(path: Path): Option[Json]
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
- Json
-
final
def
get(lookup: String): Option[Json]
Looks up a Value by name in the children.
Looks up a Value by name in the children.
- Definition Classes
- Json
-
def
getArr: Option[Arr]
Casts to Arr if it's of Arr type or returns None
Casts to Arr if it's of Arr type or returns None
- Definition Classes
- Json
-
def
getBigDecimal: Option[BigDecimal]
Convenience method for getNum.map(_.value)
Convenience method for getNum.map(_.value)
- Definition Classes
- Json
-
def
getBool: Option[Bool]
Casts to Bool if it's of Bool type or returns None
Casts to Bool if it's of Bool type or returns None
- Definition Classes
- Json
-
def
getBoolean: Option[Boolean]
Convenience method for getBool.map(_.value)
Convenience method for getBool.map(_.value)
- Definition Classes
- Json
-
def
getByte: Option[Byte]
- Definition Classes
- Json
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
getDouble: Option[Double]
- Definition Classes
- Json
-
def
getFloat: Option[Float]
- Definition Classes
- Json
-
def
getInt: Option[Int]
- Definition Classes
- Json
-
def
getLong: Option[Long]
- Definition Classes
- Json
-
def
getMap: Option[Map[String, Json]]
Convenience method for getObj.map(_.value)
Convenience method for getObj.map(_.value)
- Definition Classes
- Json
-
def
getNum: Option[Num]
Casts to Num if it's of Num type or returns None
Casts to Num if it's of Num type or returns None
- Definition Classes
- Json
-
def
getObj: Option[Obj]
Casts to Obj if it's of Obj type or returns None
Casts to Obj if it's of Obj type or returns None
- Definition Classes
- Json
-
final
def
getOrCreate(lookup: String): Json
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
- Json
-
def
getShort: Option[Short]
- Definition Classes
- Json
-
def
getStr: Option[Str]
Casts to Str if it's of Str type or returns None
Casts to Str if it's of Str type or returns None
- Definition Classes
- Json
-
def
getString: Option[String]
Convenience method for getStr.map(_.value)
Convenience method for getStr.map(_.value)
- Definition Classes
- Json
-
final
def
getValue[V <: Json](type: ValueType[V]): Option[V]
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]
- Definition Classes
- Json
-
def
getVector: Option[Vector[Json]]
Convenience method for getArr.map(_.value)
Convenience method for getArr.map(_.value)
- Definition Classes
- Json
-
def
isArr: Boolean
True if this is an Arr
True if this is an Arr
- Definition Classes
- Json
-
def
isBool: Boolean
True if this is a Bool
True if this is a Bool
- Definition Classes
- Json
- def isEmpty: Boolean
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
def
isNull: Boolean
True if this is a Null
True if this is a Null
- Definition Classes
- Json
-
def
isNum: Boolean
True if this is a Num
True if this is a Num
- Definition Classes
- Json
-
def
isNumDec: Boolean
- Definition Classes
- Json
-
def
isNumInt: Boolean
- Definition Classes
- Json
-
def
isObj: Boolean
True if this is an Obj
True if this is an Obj
- Definition Classes
- Json
-
def
isStr: Boolean
True if this is a Str
True if this is a Str
- Definition Classes
- Json
-
def
merge(value: Json, path: Path = Path.empty, type: MergeType = MergeType.Overwrite): Json
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
- Json
-
def
modify(path: Path)(f: (Json) ⇒ Json): Json
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
- Json
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
nonEmpty: Boolean
- Definition Classes
- Json
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
def
remove(path: Path): Json
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
- Json
-
def
set(path: Path, value: Json): Json
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
- Json
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- NumInt → AnyRef → Any
-
def
type: ValueType[NumInt]
The type of value
- val value: Long
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()