JsArray

smile.json.JsArray
See theJsArray companion object
case class JsArray(elements: ArrayBuffer[JsValue]) extends JsValue, Iterable[JsValue]

Attributes

Companion
object
Graph
Supertypes
trait Serializable
trait Product
trait Equals
trait Iterable[JsValue]
trait JsValue
trait Dynamic
class Object
trait Matchable
class Any
Show all

Members list

Value members

Concrete methods

Appends a number of elements provided by an iterable object. The identity of the array is returned.

Appends a number of elements provided by an iterable object. The identity of the array is returned.

Value parameters

xs

the iterable object.

Attributes

Returns

the updated buffer.

Prepends a number of elements provided by an iterable object. The identity of the array is returned.

Prepends a number of elements provided by an iterable object. The identity of the array is returned.

Value parameters

xs

the iterable object.

Attributes

Returns

the updated array.

def +=(elem: JsValue): JsArray

Appends a single element to this array and returns the identity of the array. It takes constant amortized time.

Appends a single element to this array and returns the identity of the array. It takes constant amortized time.

Value parameters

elem

the element to append.

Attributes

Returns

the updated array.

def +=:(elem: JsValue): JsValue

Prepends a single element to this buffer and returns the identity of the array. It takes time linear in the buffer size.

Prepends a single element to this buffer and returns the identity of the array. It takes time linear in the buffer size.

Value parameters

elem

the element to prepend.

Attributes

Returns

the updated array.

override def apply(index: Int): JsValue

Attributes

Definition Classes
override def apply(start: Int, end: Int): JsArray

Attributes

Definition Classes
override def apply(start: Int, end: Int, step: Int): JsArray

Attributes

Definition Classes
override def apply(range: Range): JsArray

Attributes

Definition Classes
override def equals(o: Any): Boolean

Compares the receiver object (this) with the argument object (that) for equivalence.

Compares the receiver object (this) with the argument object (that) for equivalence.

Any implementation of this method should be an equivalence relation:

  • It is reflexive: for any instance x of type Any, x.equals(x) should return true.
  • It is symmetric: for any instances x and y of type Any, x.equals(y) should return true if and only if y.equals(x) returns true.
  • It is transitive: for any instances x, y, and z of type Any if x.equals(y) returns true and y.equals(z) returns true, then x.equals(z) should return true.

If you override this method, you should verify that your implementation remains an equivalence relation. Additionally, when overriding this method it is usually necessary to override hashCode to ensure that objects which are "equal" (o1.equals(o2) returns true) hash to the same scala.Int. (o1.hashCode.equals(o2.hashCode)).

Value parameters

that

the object to compare against this object for equality.

Attributes

Returns

true if the receiver object is equivalent to the argument; false otherwise.

Definition Classes
Equals -> Any
override def exists(p: JsValue => Boolean): Boolean

Attributes

Definition Classes
override def find(p: JsValue => Boolean): Option[JsValue]

Attributes

Definition Classes
override def forall(p: JsValue => Boolean): Boolean

Attributes

Definition Classes
override def foreach[U](p: JsValue => U): Unit

Attributes

Definition Classes
def insertAll(idx: Int, seq: Iterable[JsValue]): Unit

Inserts new elements at the index n. Opposed to method update, this method will not replace an element with a new one. Instead, it will insert a new element at index n.

Inserts new elements at the index n. Opposed to method update, this method will not replace an element with a new one. Instead, it will insert a new element at index n.

Value parameters

idx

the index where a new element will be inserted.

seq

the iterable object providing all elements to insert.

Attributes

override def isEmpty: Boolean

Attributes

Definition Classes
override def iterator: Iterator[JsValue]

Attributes

Definition Classes
def jsonl: String

Returns string representation in JSON Lines text format, also called newline-delimited JSON.

Returns string representation in JSON Lines text format, also called newline-delimited JSON.

Attributes

override def knownSize: Int

Attributes

Definition Classes
override def remove(index: Int): JsValue

Attributes

Definition Classes
def remove(idx: Int, count: Int): Unit

Removes the element on a given index position. It takes time linear in the buffer size.

Removes the element on a given index position. It takes time linear in the buffer size.

Value parameters

count

the number of elements to delete

idx

the index which refers to the first element to delete.

Attributes

override def size: Int

Attributes

Definition Classes
override def toString: String

Returns a string representation of the object.

Returns a string representation of the object.

The default representation is platform dependent.

Attributes

Returns

a string representation of the object.

Definition Classes
Iterable -> JsValue -> Any
override def update(index: Int, value: JsValue): JsValue

Attributes

Definition Classes
override def updateDynamic(index: Int)(value: JsValue): JsValue

Attributes

Definition Classes

Inherited methods

final def ++[B >: JsValue](suffix: IterableOnce[B]): Iterable[B]

Attributes

Inherited from:
IterableOps
final def addString(b: StringBuilder): b.type

Attributes

Inherited from:
IterableOnceOps
final def addString(b: StringBuilder, sep: String): b.type

Attributes

Inherited from:
IterableOnceOps

Attributes

Inherited from:
IterableOnceOps
def apply(key: String): JsValue

Attributes

Inherited from:
JsValue
def applyDynamic(key: String)(index: Int): JsValue

Attributes

Inherited from:
JsValue

Attributes

Inherited from:
JsValue
def asDecimal: BigDecimal

Attributes

Inherited from:
JsValue

Attributes

Inherited from:
JsValue
def asInstant: Instant

Attributes

Inherited from:
JsValue
def asInt: Int

Attributes

Inherited from:
JsValue
def asLocalDate: LocalDate

Attributes

Inherited from:
JsValue
def asLocalDateTime: LocalDateTime

Attributes

Inherited from:
JsValue
def asLocalTime: LocalTime

Attributes

Inherited from:
JsValue
def asLong: Long

Attributes

Inherited from:
JsValue
def asTimestamp: Timestamp

Attributes

Inherited from:
JsValue

Attributes

Inherited from:
IterableOps

Attributes

Inherited from:
IterableOnceOps

Attributes

Inherited from:
JsValue

Attributes

Inherited from:
IterableOps
def copyToArray[B >: JsValue](xs: Array[B], start: Int, len: Int): Int

Attributes

Inherited from:
IterableOnceOps
def copyToArray[B >: JsValue](xs: Array[B], start: Int): Int

Attributes

Inherited from:
IterableOnceOps
def copyToArray[B >: JsValue](xs: Array[B]): Int

Attributes

Inherited from:
IterableOnceOps

Attributes

Inherited from:
IterableOnceOps
def count(p: JsValue => Boolean): Int

Attributes

Inherited from:
IterableOnceOps

Attributes

Inherited from:
IterableOps

Attributes

Inherited from:
IterableOps

Attributes

Inherited from:
IterableOps
override def empty: Iterable[JsValue]

Attributes

Definition Classes
Inherited from:
IterableFactoryDefaults

Attributes

Inherited from:
IterableOps

Attributes

Inherited from:
IterableOps

Attributes

Inherited from:
IterableOps
def flatten[B](implicit asIterable: JsValue => IterableOnce[B]): Iterable[B]

Attributes

Inherited from:
IterableOps
def fold[A1 >: JsValue](z: A1)(op: (A1, A1) => A1): A1

Attributes

Inherited from:
IterableOnceOps
def foldLeft[B](z: B)(op: (B, JsValue) => B): B

Attributes

Inherited from:
IterableOnceOps
def foldRight[B](z: B)(op: (JsValue, B) => B): B

Attributes

Inherited from:
IterableOnceOps

Attributes

Inherited from:
IterableFactoryDefaults
def get(key: String): Option[JsValue]

Attributes

Inherited from:
JsValue
def groupBy[K](f: JsValue => K): Map[K, Iterable[JsValue]]

Attributes

Inherited from:
IterableOps
def groupMap[K, B](key: JsValue => K)(f: JsValue => B): Map[K, Iterable[B]]

Attributes

Inherited from:
IterableOps
def groupMapReduce[K, B](key: JsValue => K)(f: JsValue => B)(reduce: (B, B) => B): Map[K, B]

Attributes

Inherited from:
IterableOps

Attributes

Inherited from:
IterableOps
def head: JsValue

Attributes

Inherited from:
IterableOps

Attributes

Inherited from:
IterableOps

Attributes

Inherited from:
IterableOps

Attributes

Inherited from:
IterableOps
override def isTraversableAgain: Boolean

Attributes

Definition Classes
Inherited from:
IterableOps

Attributes

Inherited from:
Iterable
def last: JsValue

Attributes

Inherited from:
IterableOps

Attributes

Inherited from:
IterableOps
def lazyZip[B](that: Iterable[B]): LazyZip2[JsValue, B, Iterable.this.type]

Attributes

Inherited from:
Iterable
def map[B](f: JsValue => B): Iterable[B]

Attributes

Inherited from:
IterableOps
def max[B >: JsValue](implicit ord: Ordering[B]): JsValue

Attributes

Inherited from:
IterableOnceOps
def maxBy[B](f: JsValue => B)(implicit ord: Ordering[B]): JsValue

Attributes

Inherited from:
IterableOnceOps
def maxByOption[B](f: JsValue => B)(implicit ord: Ordering[B]): Option[JsValue]

Attributes

Inherited from:
IterableOnceOps
def maxOption[B >: JsValue](implicit ord: Ordering[B]): Option[JsValue]

Attributes

Inherited from:
IterableOnceOps
def min[B >: JsValue](implicit ord: Ordering[B]): JsValue

Attributes

Inherited from:
IterableOnceOps
def minBy[B](f: JsValue => B)(implicit ord: Ordering[B]): JsValue

Attributes

Inherited from:
IterableOnceOps
def minByOption[B](f: JsValue => B)(implicit ord: Ordering[B]): Option[JsValue]

Attributes

Inherited from:
IterableOnceOps
def minOption[B >: JsValue](implicit ord: Ordering[B]): Option[JsValue]

Attributes

Inherited from:
IterableOnceOps
final def mkString: String

Attributes

Inherited from:
IterableOnceOps
final def mkString(sep: String): String

Attributes

Inherited from:
IterableOnceOps

Attributes

Inherited from:
IterableOnceOps

Attributes

Inherited from:
IterableFactoryDefaults

Attributes

Inherited from:
IterableOnceOps

Attributes

Inherited from:
IterableOps
def partitionMap[A1, A2](f: JsValue => Either[A1, A2]): (Iterable[A1], Iterable[A2])

Attributes

Inherited from:
IterableOps

Attributes

Inherited from:
JsValue
def product[B >: JsValue](implicit num: Numeric[B]): B

Attributes

Inherited from:
IterableOnceOps

Attributes

Inherited from:
Product

Attributes

Inherited from:
Product
def reduce[B >: JsValue](op: (B, B) => B): B

Attributes

Inherited from:
IterableOnceOps
def reduceLeft[B >: JsValue](op: (B, JsValue) => B): B

Attributes

Inherited from:
IterableOnceOps
def reduceLeftOption[B >: JsValue](op: (B, JsValue) => B): Option[B]

Attributes

Inherited from:
IterableOnceOps
def reduceOption[B >: JsValue](op: (B, B) => B): Option[B]

Attributes

Inherited from:
IterableOnceOps
def reduceRight[B >: JsValue](op: (JsValue, B) => B): B

Attributes

Inherited from:
IterableOnceOps
def reduceRightOption[B >: JsValue](op: (JsValue, B) => B): Option[B]

Attributes

Inherited from:
IterableOnceOps
def remove(key: String): Option[JsValue]

Attributes

Inherited from:
JsValue
protected def reversed: Iterable[JsValue]

Attributes

Inherited from:
IterableOnceOps
def scan[B >: JsValue](z: B)(op: (B, B) => B): Iterable[B]

Attributes

Inherited from:
IterableOps
def scanLeft[B](z: B)(op: (B, JsValue) => B): Iterable[B]

Attributes

Inherited from:
IterableOps
def scanRight[B](z: B)(op: (JsValue, B) => B): Iterable[B]

Attributes

Inherited from:
IterableOps

Attributes

Inherited from:
JsValue

Attributes

Inherited from:
IterableOps

Attributes

Inherited from:
IterableOps
final def sizeIs: SizeCompareOps

Attributes

Inherited from:
IterableOps

Attributes

Inherited from:
IterableOps

Attributes

Inherited from:
IterableOps

Attributes

Inherited from:
IterableOps

Attributes

Inherited from:
IterableOps
override def splitAt(n: Int): (Iterable[JsValue], Iterable[JsValue])

Attributes

Definition Classes
Inherited from:
IterableOps
def stepper[S <: Stepper[_]](implicit shape: StepperShape[JsValue, S]): S

Attributes

Inherited from:
IterableOnce
def sum[B >: JsValue](implicit num: Numeric[B]): B

Attributes

Inherited from:
IterableOnceOps

Attributes

Inherited from:
IterableOps

Attributes

Inherited from:
IterableOps

Attributes

Inherited from:
IterableOps

Attributes

Inherited from:
IterableOps

Attributes

Inherited from:
IterableOps
override def tapEach[U](f: JsValue => U): Iterable[JsValue]

Attributes

Definition Classes
Inherited from:
IterableOps
def to[C1](factory: Factory[JsValue, C1]): C1

Attributes

Inherited from:
IterableOnceOps

Attributes

Inherited from:
IterableOnceOps
final def toBuffer[B >: JsValue]: Buffer[B]

Attributes

Inherited from:
IterableOnceOps

Attributes

Inherited from:
IterableOnceOps

Attributes

Inherited from:
IterableOnceOps
def toMap[K, V](implicit ev: JsValue <:< (K, V)): Map[K, V]

Attributes

Inherited from:
IterableOnceOps
def toSeq: Seq[JsValue]

Attributes

Inherited from:
IterableOnceOps
def toSet[B >: JsValue]: Set[B]

Attributes

Inherited from:
IterableOnceOps

Attributes

Inherited from:
IterableOnceOps

Attributes

Inherited from:
IterableOps
def unzip[A1, A2](implicit asPair: JsValue => (A1, A2)): (Iterable[A1], Iterable[A2])

Attributes

Inherited from:
IterableOps
def unzip3[A1, A2, A3](implicit asTriple: JsValue => (A1, A2, A3)): (Iterable[A1], Iterable[A2], Iterable[A3])

Attributes

Inherited from:
IterableOps
def update(key: String, value: JsValue): JsValue

Attributes

Inherited from:
JsValue
def updateDynamic(key: String)(value: JsValue): JsValue

Attributes

Inherited from:
JsValue
def view: View[JsValue]

Attributes

Inherited from:
IterableOps

Attributes

Inherited from:
IterableOps

Attributes

Inherited from:
IterableOps
def zipAll[A1 >: JsValue, B](that: Iterable[B], thisElem: A1, thatElem: B): Iterable[(A1, B)]

Attributes

Inherited from:
IterableOps

Attributes

Inherited from:
IterableOps

Deprecated and Inherited methods

Attributes

Deprecated
[Since version 2.13.0] Use ++ instead of ++: for collections of type Iterable
Inherited from:
IterableOps
final def /:[B](z: B)(op: (B, JsValue) => B): B

Attributes

Deprecated
[Since version 2.13.0] Use foldLeft instead of /:
Inherited from:
IterableOnceOps
final def :\[B](z: B)(op: (JsValue, B) => B): B

Attributes

Deprecated
[Since version 2.13.0] Use foldRight instead of :\\
Inherited from:
IterableOnceOps
def aggregate[B](z: => B)(seqop: (B, JsValue) => B, combop: (B, B) => B): B

Attributes

Deprecated
[Since version 2.13.0] `aggregate` is not relevant for sequential collections. Use `foldLeft(z)(seqop)` instead.
Inherited from:
IterableOnceOps

Attributes

Deprecated
[Since version 2.13.0] Use iterableFactory instead
Inherited from:
IterableOps
final def copyToBuffer[B >: JsValue](dest: Buffer[B]): Unit

Attributes

Deprecated
[Since version 2.13.0] Use `dest ++= coll` instead
Inherited from:
IterableOnceOps

Attributes

Deprecated
[Since version 2.13.0] Check .knownSize instead of .hasDefiniteSize for more actionable information (see scaladoc for details)
Inherited from:
IterableOnceOps
final def repr: Iterable[JsValue]

Attributes

Deprecated
[Since version 2.13.0] Use coll instead of repr in a collection implementation, use the collection value itself from the outside
Inherited from:
IterableOps
def seq: Iterable.this.type

Attributes

Deprecated
[Since version 2.13.0] Iterable.seq always returns the iterable itself
Inherited from:
Iterable
final def toIterable: Iterable.this.type

Attributes

Deprecated
[Since version 2.13.7] toIterable is internal and will be made protected; its name is similar to `toList` or `toSeq`, but it doesn\'t copy non-immutable collections
Inherited from:
Iterable

Attributes

Deprecated
[Since version 2.13.0] Use .iterator instead of .toIterator
Inherited from:
IterableOnceOps
final def toStream: Stream[JsValue]

Attributes

Deprecated
[Since version 2.13.0] Use .to(LazyList) instead of .toStream
Inherited from:
IterableOnceOps

Attributes

Deprecated
[Since version 2.13.0] toTraversable is internal and will be made protected; its name is similar to `toList` or `toSeq`, but it doesn\'t copy non-immutable collections
Inherited from:
IterableOps

Attributes

Deprecated
[Since version 2.13.0] Use .view.slice(from, until) instead of .view(from, until)
Inherited from:
IterableOps