Modifier and Type | Method | Description |
---|---|---|
static JsArray |
JsArray._empty_() |
Returns a mutable empty array.
|
static JsArray |
JsArray._of_(boolean bool,
boolean... others) |
Returns a mutable array from one or more booleans.
|
static JsArray |
JsArray._of_(double number,
double... others) |
Returns a mutable array from one or more doubles.
|
static JsArray |
JsArray._of_(int number,
int... others) |
Returns a mutable array from one or more integers
|
static JsArray |
JsArray._of_(long number,
long... others) |
Returns a mutable array from one or more longs.
|
static JsArray |
JsArray._of_(String str,
String... others) |
Returns a mutable array from one or more strings.
|
static JsArray |
JsArray._of_(List<JsElem> list) |
Returns a mutable array copying the reference of the collection of elements.
|
static JsArray |
JsArray._of_(JsElem e) |
Returns a mutable one-element array.
|
static JsArray |
JsArray._of_(JsElem e,
JsElem e1) |
Returns a mutable two-element array.
|
static JsArray |
JsArray._of_(JsElem e,
JsElem e1,
JsElem e2) |
Returns a mutable three-element array.
|
static JsArray |
JsArray._of_(JsElem e,
JsElem e1,
JsElem e2,
JsElem e3) |
Returns a mutable four-element array.
|
static JsArray |
JsArray._of_(JsElem e,
JsElem e1,
JsElem e2,
JsElem e3,
JsElem e4) |
Returns a mutable five-element array.
|
static JsArray |
JsArray._of_(JsElem e,
JsElem e1,
JsElem e2,
JsElem e3,
JsElem e4,
JsElem... rest) |
Returns a mutable array containing an arbitrary number of elements.
|
static JsArray |
JsArray._of_(JsPair pair,
JsPair... pairs) |
Returns a mutable array from one or more pairs.
|
JsArray |
JsArray.append(JsElem elem,
JsElem... others) |
Adds one or more elements, starting from the first, to the back of this array.
|
JsArray |
JsArray.appendAll(JsArray array) |
Adds all the elements of the given array, starting from the head, to the back of this array.
|
JsArray |
Try.arrOrElse(Supplier<JsArray> other) |
Returns the computed JsArray if the parsed string is a well-formed json array, returning the JsArray
given by the supplier otherwise.
|
JsArray |
Try.arrOrElseThrow() |
Returns the computed JsArray if the parsed string is a well-formed json array, throwing a
MalformedJson exception otherwise.
|
default JsArray |
JsElem.asJsArray() |
|
static JsArray |
JsArray.empty() |
Returns the immutable empty array.
|
JsArray |
JsArray.init() |
Returns all the elements of this array except the last one.
|
JsArray |
JsArray.intersection(JsArray that,
JsArray.TYPE ARRAY_AS) |
Returns the intersection of this array and another given as a parameter, defining characteristics
like order and duplicates occurrence with the given ARRAY_AS parameter.
|
JsArray |
JsArray.intersection_(JsArray that) |
Returns the intersection of this array and another given as parameter considering both
JsArray.TYPE.LIST lists
and applying recursively the intersection to those elements which are Json of the same type and
are located at the same position. |
static JsArray |
JsArray.of(boolean bool,
boolean... others) |
Returns an immutable array from one or more booleans.
|
static JsArray |
JsArray.of(double number,
double... others) |
Returns an immutable array from one or more doubles.
|
static JsArray |
JsArray.of(int number,
int... others) |
Returns an immutable array from one or more integers.
|
static JsArray |
JsArray.of(long number,
long... others) |
Returns an immutable array from one or more longs.
|
static JsArray |
JsArray.of(String str,
String... others) |
Returns an immutable array from one or more strings.
|
static JsArray |
JsArray.of(Collection<? extends JsElem> list) |
Returns an immutable array from the collection of elements.
|
static JsArray |
JsArray.of(JsElem e) |
Returns an immutable one-element array.
|
static JsArray |
JsArray.of(JsElem e,
JsElem e1) |
Returns an immutable two-element array.
|
static JsArray |
JsArray.of(JsElem e,
JsElem e1,
JsElem e2) |
Returns an immutable three-element array.
|
static JsArray |
JsArray.of(JsElem e,
JsElem e1,
JsElem e2,
JsElem e3) |
Returns an immutable four-element array.
|
static JsArray |
JsArray.of(JsElem e,
JsElem e1,
JsElem e2,
JsElem e3,
JsElem e4) |
Returns an immutable five-element array.
|
static JsArray |
JsArray.of(JsElem e,
JsElem e1,
JsElem e2,
JsElem e3,
JsElem e4,
JsElem... rest) |
Returns an immutable array.
|
static JsArray |
JsArray.of(JsPair pair,
JsPair... pairs) |
Returns an immutable array from one or more pairs.
|
JsArray |
TryArr.orElse(Supplier<JsArray> other) |
Returns the computed JsArray if the parsed string is a well-formed json array, returning the
JsArray given by the supplier otherwise.
|
JsArray |
TryArr.orElseThrow() |
Returns the computed JsArray if the parsed string is a well-formed json array, throwing a MalformedJson
otherwise.
|
JsArray |
JsArray.prepend(JsElem elem,
JsElem... others) |
Adds one or more elements, starting from the last, to the front of this array.
|
JsArray |
JsArray.prependAll(JsArray array) |
Adds all the elements of the array, starting from the last, to the front of this array.
|
JsArray |
JsArray.tail() |
Returns a json array consisting of all elements of this array except the first one.
|
JsArray |
JsArray.union(JsArray that,
JsArray.TYPE ARRAY_AS) |
Returns the union of this array and another, defining characteristics like order and duplicates
occurrence with the given ARRAY_AS parameter.
|
JsArray |
JsArray.union_(JsArray that) |
Returns the union of this array and another given as parameter considering both
JsArray.TYPE.LIST lists
and applying recursively the union to those elements which are Json of the same type and are located
at the same position. |
Modifier and Type | Method | Description |
---|---|---|
static Collector<JsPair,JsArray,JsArray> |
JsArray._collector_() |
Returns a collector that accumulates the pairs from a stream into a mutable array.
|
static Collector<JsPair,JsArray,JsArray> |
JsArray._collector_() |
Returns a collector that accumulates the pairs from a stream into a mutable array.
|
static Collector<JsPair,JsArray,JsArray> |
JsArray.collector() |
Returns a collector that accumulates the pairs from a stream into an immutable array.
|
static Collector<JsPair,JsArray,JsArray> |
JsArray.collector() |
Returns a collector that accumulates the pairs from a stream into an immutable array.
|
default Optional<JsArray> |
Json.getArray(String path) |
Returns the array located at the given path as a big decimal or
Optional.empty() if it
doesn't exist or it's not an array. |
default Optional<JsArray> |
Json.getArray(JsPath path) |
Returns the array located at the given path or
Optional.empty() if it doesn't exist or
it's not an array. |
Optional<JsArray> |
TryArr.toOptional() |
Returns the computed JsArray wrapped in an optional if the parsed string is a well-formed json
array, returning an empty optional otherwise.
|
Modifier and Type | Method | Description |
---|---|---|
JsArray |
JsArray.appendAll(JsArray array) |
Adds all the elements of the given array, starting from the head, to the back of this array.
|
default T |
Json.appendAll(String path,
JsArray elems) |
Appends all the elements of the array, starting from the head, to the array located at the given
path in this json.
|
T |
Json.appendAll(JsPath path,
JsArray elems) |
Appends all the elements of the array, starting from the head, to the array located at the given
path in this json.
|
default boolean |
JsArray.equals(JsArray array,
JsArray.TYPE ARRAY_AS) |
Returns true if this array is equal to the given as a parameter.
|
JsArray |
JsArray.intersection(JsArray that,
JsArray.TYPE ARRAY_AS) |
Returns the intersection of this array and another given as a parameter, defining characteristics
like order and duplicates occurrence with the given ARRAY_AS parameter.
|
JsArray |
JsArray.intersection_(JsArray that) |
Returns the intersection of this array and another given as parameter considering both
JsArray.TYPE.LIST lists
and applying recursively the intersection to those elements which are Json of the same type and
are located at the same position. |
JsArray |
JsArray.prependAll(JsArray array) |
Adds all the elements of the array, starting from the last, to the front of this array.
|
default T |
Json.prependAll(String path,
JsArray elems) |
prepends all the elements of the array, starting from the head, to the array located at the path
in this json.
|
T |
Json.prependAll(JsPath path,
JsArray elems) |
prepends all the elements of the array, starting from the head, to the array located at the path
in this json.
|
JsArray |
JsArray.union(JsArray that,
JsArray.TYPE ARRAY_AS) |
Returns the union of this array and another, defining characteristics like order and duplicates
occurrence with the given ARRAY_AS parameter.
|
JsArray |
JsArray.union_(JsArray that) |
Returns the union of this array and another given as parameter considering both
JsArray.TYPE.LIST lists
and applying recursively the union to those elements which are Json of the same type and are located
at the same position. |
Modifier and Type | Method | Description |
---|---|---|
default T |
Json.appendAllIfPresent(String path,
Supplier<JsArray> supplier) |
Appends all the elements of the array computed by the supplier, starting from the head, to an array
located at the path in this json, returning the same this instance if the array is not present,
in which case, the supplier is not invoked.
|
default T |
Json.appendAllIfPresent(JsPath path,
Supplier<JsArray> supplier) |
Appends all the elements of the array computed by the supplier, starting from the head, to an
array located at the given path in this json, returning the same this instance if the array is
not present, in which case, the supplier is not invoked.
|
JsArray |
Try.arrOrElse(Supplier<JsArray> other) |
Returns the computed JsArray if the parsed string is a well-formed json array, returning the JsArray
given by the supplier otherwise.
|
default boolean |
JsElem.isArray(Predicate<JsArray> predicate) |
Returns true if this elem is a JsArray and satisfies the given predicate
|
JsArray |
TryArr.orElse(Supplier<JsArray> other) |
Returns the computed JsArray if the parsed string is a well-formed json array, returning the
JsArray given by the supplier otherwise.
|
default T |
Json.prependAllIfPresent(String path,
Supplier<JsArray> supplier) |
Prepends all the elements of the array computed by the supplier, starting from the head, to the
array located at the path in this json, returning the same this instance if the array is not present,
in which case, the supplier is not invoked.
|
default T |
Json.prependAllIfPresent(JsPath path,
Supplier<JsArray> supplier) |
Prepends all the elements of the array computed by the supplier, starting from the head, to the
array located at the path in this json, returning the same this instance if the array is not present,
in which case, the supplier is not invoked.
|
Copyright © 2019. All rights reserved.