Modifier and Type | Interface | Description |
---|---|---|
static class |
JsArray.TYPE |
Type of arrays: SET, MULTISET or LIST.
|
Modifier and Type | Field | Description |
---|---|---|
static long |
serialVersionUID |
Modifier and Type | Method | Description |
---|---|---|
static Collector<JsPair,JsArray,JsArray> |
_collector_() |
Returns a collector that accumulates the pairs from a stream into a mutable array.
|
static JsArray |
_empty_() |
Returns a mutable empty array.
|
static JsArray |
_of_(boolean bool,
boolean... others) |
Returns a mutable array from one or more booleans.
|
static JsArray |
_of_(double number,
double... others) |
Returns a mutable array from one or more doubles.
|
static JsArray |
_of_(int number,
int... others) |
Returns a mutable array from one or more integers
|
static JsArray |
_of_(long number,
long... others) |
Returns a mutable array from one or more longs.
|
static JsArray |
_of_(String str,
String... others) |
Returns a mutable array from one or more strings.
|
static JsArray |
_of_(List<JsElem> list) |
Returns a mutable array copying the reference of the collection of elements.
|
static JsArray |
_of_(JsElem e) |
Returns a mutable one-element array.
|
static JsArray |
_of_(JsElem e,
JsElem e1) |
Returns a mutable two-element array.
|
static JsArray |
_of_(JsElem e,
JsElem e1,
JsElem e2) |
Returns a mutable three-element array.
|
static JsArray |
_of_(JsElem e,
JsElem e1,
JsElem e2,
JsElem e3) |
Returns a mutable four-element array.
|
static JsArray |
_of_(JsElem e,
JsElem e1,
JsElem e2,
JsElem e3,
JsElem e4) |
Returns a mutable five-element array.
|
static 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 |
_of_(JsPair pair,
JsPair... pairs) |
Returns a mutable array from one or more pairs.
|
static TryArr |
_parse_(String str) |
Tries to parse the string into a mutable json array.
|
static TryArr |
_parse_(String str,
ParseOptions options) |
Tries to parse the string into a mutable array, performing some operations while the parsing.
|
JsArray |
append(JsElem elem,
JsElem... others) |
Adds one or more elements, starting from the first, to the back of this array.
|
JsArray |
appendAll(JsArray array) |
Adds all the elements of the given array, starting from the head, to the back of this array.
|
static Collector<JsPair,JsArray,JsArray> |
collector() |
Returns a collector that accumulates the pairs from a stream into an immutable array.
|
static JsArray |
empty() |
Returns the immutable empty array.
|
default boolean |
equals(JsArray array,
JsArray.TYPE ARRAY_AS) |
Returns true if this array is equal to the given as a parameter.
|
JsElem |
head() |
Returns the first element of this array.
|
JsArray |
init() |
Returns all the elements of this array except the last one.
|
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 |
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. |
JsElem |
last() |
Returns the last element of this array.
|
static JsArray |
of(boolean bool,
boolean... others) |
Returns an immutable array from one or more booleans.
|
static JsArray |
of(double number,
double... others) |
Returns an immutable array from one or more doubles.
|
static JsArray |
of(int number,
int... others) |
Returns an immutable array from one or more integers.
|
static JsArray |
of(long number,
long... others) |
Returns an immutable array from one or more longs.
|
static JsArray |
of(String str,
String... others) |
Returns an immutable array from one or more strings.
|
static JsArray |
of(Collection<? extends JsElem> list) |
Returns an immutable array from the collection of elements.
|
static JsArray |
of(JsElem e) |
Returns an immutable one-element array.
|
static JsArray |
of(JsElem e,
JsElem e1) |
Returns an immutable two-element array.
|
static JsArray |
of(JsElem e,
JsElem e1,
JsElem e2) |
Returns an immutable three-element array.
|
static JsArray |
of(JsElem e,
JsElem e1,
JsElem e2,
JsElem e3) |
Returns an immutable four-element array.
|
static JsArray |
of(JsElem e,
JsElem e1,
JsElem e2,
JsElem e3,
JsElem e4) |
Returns an immutable five-element array.
|
static JsArray |
of(JsElem e,
JsElem e1,
JsElem e2,
JsElem e3,
JsElem e4,
JsElem... rest) |
Returns an immutable array.
|
static JsArray |
of(JsPair pair,
JsPair... pairs) |
Returns an immutable array from one or more pairs.
|
static TryArr |
parse(String str) |
Tries to parse the string into an immutable array.
|
static TryArr |
parse(String str,
ParseOptions options) |
Tries to parse the string into an immutable array, performing some operations during the parsing.
|
JsArray |
prepend(JsElem elem,
JsElem... others) |
Adds one or more elements, starting from the last, to the front of this array.
|
JsArray |
prependAll(JsArray array) |
Adds all the elements of the array, starting from the last, to the front of this array.
|
JsArray |
tail() |
Returns a json array consisting of all elements of this array except the first one.
|
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 |
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. |
forEach, iterator, spliterator
asJsArray, asJsBigDec, asJsBigInt, asJsBool, asJsDouble, asJsInt, asJsLong, asJsObj, asJson, asJsStr, isArray, isArray, isBigDec, isBigDec, isBigInt, isBigInt, isBool, isDouble, isDouble, isFalse, isInstant, isInstant, isInt, isInt, isIntegral, isJson, isJson, isLocalDate, isLocalDate, isLocalDateTime, isLocalDateTime, isLong, isLong, isNothing, isNotJson, isNotNothing, isNotNull, isNotNumber, isNull, isNumber, isObj, isObj, isStr, isStr, isTrue
append, append, append, append, append, append, append, append, append, append, append, append, append, append, appendAll, appendAll, appendAllIfPresent, appendAllIfPresent, appendIfPresent, appendIfPresent, appendIfPresent, appendIfPresent, appendIfPresent, appendIfPresent, appendIfPresent, appendIfPresent, appendIfPresent, appendIfPresent, appendIfPresent, appendIfPresent, containsElem, containsElem_, containsPath, containsPath, equals, filterElems, filterElems_, filterKeys, filterKeys_, filterObjs, filterObjs_, get, get, get, getArray, getArray, getBigDecimal, getBigDecimal, getBigInt, getBigInt, getBool, getBool, getDouble, getDouble, getInt, getInt, getLong, getLong, getObj, getObj, getStr, getStr, ifEmptyElse, isEmpty, isImmutable, isMutable, isNotEmpty, map, mapElems, mapElems, mapElems_, mapElems_, mapKeys, mapKeys, mapKeys_, mapKeys_, mapObjs, mapObjs, mapObjs_, mapObjs_, merge, merge, prepend, prepend, prepend, prepend, prepend, prepend, prepend, prepend, prepend, prepend, prepend, prepend, prepend, prepend, prependAll, prependAll, prependAllIfPresent, prependAllIfPresent, prependIfPresent, prependIfPresent, prependIfPresent, prependIfPresent, prependIfPresent, prependIfPresent, prependIfPresent, prependIfPresent, prependIfPresent, prependIfPresent, prependIfPresent, prependIfPresent, put, put, put, put, put, put, put, put, put, put, putIf, putIf, putIfAbsent, putIfAbsent, putIfAbsent, putIfAbsent, putIfAbsent, putIfAbsent, putIfAbsent, putIfAbsent, putIfPresent, putIfPresent, putIfPresent, putIfPresent, putIfPresent, putIfPresent, putIfPresent, putIfPresent, reduce, reduce_, remove, remove, size, size, size, size_, size_, size_, stream, stream_, times, times_, toImmutable, toMutable
static final long serialVersionUID
static JsArray _empty_()
static JsArray _of_(List<JsElem> list)
list
- the Collection of JsElem from which reference the JsArray will be createdUnsupportedOperationException
- if an elem of the list is an immutable Jsonstatic JsArray _of_(JsElem e)
e
- the JsElemUnsupportedOperationException
- if the elem is an immutable Jsonstatic JsArray _of_(JsElem e, JsElem e1)
e
- a JsEleme1
- a JsElemUnsupportedOperationException
- if an elem is an immutable Jsonstatic JsArray _of_(JsElem e, JsElem e1, JsElem e2)
e
- a JsEleme1
- a JsEleme2
- a JsElemUnsupportedOperationException
- if an elem is an immutable Jsonstatic JsArray _of_(JsElem e, JsElem e1, JsElem e2, JsElem e3)
e
- a JsEleme1
- a JsEleme2
- a JsEleme3
- a JsElemUnsupportedOperationException
- if an elem is an immutable Jsonstatic JsArray _of_(JsElem e, JsElem e1, JsElem e2, JsElem e3, JsElem e4)
e
- a JsEleme1
- a JsEleme2
- a JsEleme3
- a JsEleme4
- a JsElemUnsupportedOperationException
- if an elem is an immutable Jsonstatic JsArray _of_(JsElem e, JsElem e1, JsElem e2, JsElem e3, JsElem e4, JsElem... rest)
e
- a JsEleme1
- a JsEleme2
- a JsEleme3
- a JsEleme4
- a JsElemrest
- more optional JsElemUnsupportedOperationException
- if an elem is an immutable Jsonstatic TryArr _parse_(String str)
str
- the string to be parsedTryArr
computationdefault boolean equals(JsArray array, JsArray.TYPE ARRAY_AS)
array
- the given arrayARRAY_AS
- option to define if arrays are considered SETS, LISTS OR MULTISETstatic TryArr _parse_(String str, ParseOptions options)
str
- the string that will be parsed.options
- a builder with the filters and maps that, if specified, will be applied during the parsingTryArr
computationJsArray appendAll(JsArray array)
array
- the JsArray of elements to be added to the backJsArray prependAll(JsArray array)
array
- the JsArray of elements to be added to the frontJsArray append(JsElem elem, JsElem... others)
elem
- the JsElem to be added to the back.others
- more optional JsElem to be added to the backJsArray prepend(JsElem elem, JsElem... others)
elem
- the JsElem to be added to the front.others
- more optional JsElem to be added to the frontstatic Collector<JsPair,JsArray,JsArray> collector()
static Collector<JsPair,JsArray,JsArray> _collector_()
static JsArray empty()
JsElem head()
UnsupportedOperationException
- if this JsArray is emptyJsArray init()
UnsupportedOperationException
- if this JsArray is emptyJsElem last()
UnsupportedOperationException
- if this JsArray is emptystatic JsArray of(Collection<? extends JsElem> list)
list
- the Collection of JsElem from which the JsArray will be createdUnsupportedOperationException
- if an elem of the list is a mutable Jsonstatic JsArray of(JsElem e)
e
- the JsElemUnsupportedOperationException
- if the elem is a mutable Jsonstatic JsArray of(JsElem e, JsElem e1)
e
- a JsEleme1
- a JsElemUnsupportedOperationException
- if an elem is a mutable Jsonstatic JsArray of(JsElem e, JsElem e1, JsElem e2)
e
- a JsEleme1
- a JsEleme2
- a JsElemUnsupportedOperationException
- if an elem is a mutable Jsonstatic JsArray of(JsElem e, JsElem e1, JsElem e2, JsElem e3)
e
- a JsEleme1
- a JsEleme2
- a JsEleme3
- a JsElemUnsupportedOperationException
- if an elem is a mutable Jsonstatic JsArray of(JsElem e, JsElem e1, JsElem e2, JsElem e3, JsElem e4)
e
- a JsEleme1
- a JsEleme2
- a JsEleme3
- a JsEleme4
- a JsElemUnsupportedOperationException
- if an elem is a mutable Jsonstatic JsArray of(JsElem e, JsElem e1, JsElem e2, JsElem e3, JsElem e4, JsElem... rest)
e
- a JsEleme1
- a JsEleme2
- a JsEleme3
- a JsEleme4
- a JsElemrest
- more optional JsElemUnsupportedOperationException
- if an elem is a mutable Jsonstatic TryArr parse(String str)
str
- the string to be parsedTryArr
computationstatic TryArr parse(String str, ParseOptions options)
str
- string to be parsedoptions
- a Options with the filters and maps that will be applied during the parsingTryArr
computationstatic JsArray of(String str, String... others)
str
- a stringothers
- more optional stringsstatic JsArray _of_(String str, String... others)
str
- a stringothers
- more optional stringsstatic JsArray of(int number, int... others)
number
- an integerothers
- more optional integersstatic JsArray _of_(int number, int... others)
number
- an integerothers
- more optional integersstatic JsArray of(long number, long... others)
number
- a longothers
- more optional longsstatic JsArray of(boolean bool, boolean... others)
bool
- a booleanothers
- more optional booleansstatic JsArray of(double number, double... others)
number
- a doubleothers
- more optional doublesstatic JsArray _of_(long number, long... others)
number
- a longothers
- more optional longsstatic JsArray _of_(boolean bool, boolean... others)
bool
- a booleanothers
- more optional booleansstatic JsArray _of_(double number, double... others)
number
- a doubleothers
- more optional doublesJsArray tail()
UnsupportedOperationException
- if this JsArray is empty.JsArray intersection(JsArray that, JsArray.TYPE ARRAY_AS)
that
- the other arrayARRAY_AS
- option to define if arrays are considered SETS, LISTS OR MULTISETJsArray intersection_(JsArray that)
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.that
- the other arrayJsArray union(JsArray that, JsArray.TYPE ARRAY_AS)
that
- the other arrayARRAY_AS
- option to define if arrays are considered SETS, LISTS OR MULTISETJsArray union_(JsArray that)
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.that
- the other arraystatic JsArray of(JsPair pair, JsPair... pairs)
pair
- a pairpairs
- more optional pairsUnsupportedOperationException
- if an elem of a pair is mutablestatic JsArray _of_(JsPair pair, JsPair... pairs)
pair
- a pairpairs
- more optional pairsUnsupportedOperationException
- if an elem of a pair is immutableCopyright © 2019. All rights reserved.