Modifier and Type | Method | Description |
---|---|---|
static JsObj |
JsObj._empty_() |
Returns a mutable empty object.
|
static JsObj |
JsObj._of_(String key,
JsElem el) |
Returns a mutable one-pair object.
|
static JsObj |
JsObj._of_(String key1,
JsElem el1,
String key2,
JsElem el2) |
Returns a mutable two-pair object.
|
static JsObj |
JsObj._of_(String key1,
JsElem el1,
String key2,
JsElem el2,
String key3,
JsElem el3) |
Returns a mutable three-pair object.
|
static JsObj |
JsObj._of_(String key1,
JsElem el1,
String key2,
JsElem el2,
String key3,
JsElem el3,
String key4,
JsElem el4) |
Returns a mutable four-pair object.
|
static JsObj |
JsObj._of_(String key1,
JsElem el1,
String key2,
JsElem el2,
String key3,
JsElem el3,
String key4,
JsElem el4,
String key5,
JsElem el5) |
Returns a mutable five-pair object.
|
static JsObj |
JsObj._of_(String key1,
JsElem el1,
String key2,
JsElem el2,
String key3,
JsElem el3,
String key4,
JsElem el4,
String key5,
JsElem el5,
String key6,
JsElem el6) |
Returns a mutable six-pair object.
|
static JsObj |
JsObj._of_(Map<String,JsElem> map) |
Returns a mutable object from a map of elements.
|
static JsObj |
JsObj._of_(JsPair pair,
JsPair... others) |
Returns a mutable object from one or more pairs.
|
default JsObj |
JsElem.asJsObj() |
|
static JsObj |
JsObj.empty() |
Returns the immutable empty object.
|
JsObj |
JsObj.intersection(JsObj that,
JsArray.TYPE ARRAY_AS) |
Returns the intersection of this object and another, defining characteristics like order and duplicates
occurrence in arrays with the given ARRAY_AS parameter.
|
JsObj |
JsObj.intersection_(JsObj that,
JsArray.TYPE ARRAY_AS) |
Returns the intersection of this object and another given as parameter applying recursively
the intersection to those elements which are Json of the same type and are located at the same key
and defining characteristics like order and duplicates occurrence in arrays with the given ARRAY_AS
parameter.
|
JsObj |
Try.objOrElse(Supplier<JsObj> other) |
Returns the computed JsObj if the parsed string is a well-formed json object, returning the JsObj
given by the supplier otherwise.
|
JsObj |
Try.objOrElseThrow() |
Returns the computed JsObj if the parsed string is a well-formed json object, throwing a
MalformedJson exception otherwise.
|
static JsObj |
JsObj.of(String key,
JsElem el) |
Returns an immutable one-element object.
|
static JsObj |
JsObj.of(String key1,
JsElem el1,
String key2,
JsElem el2) |
Returns a two-element immutable object.
|
static JsObj |
JsObj.of(String key1,
JsElem el1,
String key2,
JsElem el2,
String key3,
JsElem el3) |
Returns a three-element immutable json object.
|
static JsObj |
JsObj.of(String key1,
JsElem el1,
String key2,
JsElem el2,
String key3,
JsElem el3,
String key4,
JsElem el4) |
Returns a four-element immutable object.
|
static JsObj |
JsObj.of(String key1,
JsElem el1,
String key2,
JsElem el2,
String key3,
JsElem el3,
String key4,
JsElem el4,
String key5,
JsElem el5) |
Returns a five-element immutable object.
|
static JsObj |
JsObj.of(String key1,
JsElem el1,
String key2,
JsElem el2,
String key3,
JsElem el3,
String key4,
JsElem el4,
String key5,
JsElem el5,
String key6,
JsElem el6) |
Returns a six-element immutable object.
|
static JsObj |
JsObj.of(Map<String,JsElem> map) |
Returns a immutable object from a map of elements.
|
static JsObj |
JsObj.of(JsPair pair,
JsPair... others) |
Returns an immutable object from one or more pairs.
|
JsObj |
TryObj.orElse(Supplier<JsObj> other) |
Returns the computed JsObj if the parsed string is a well-formed json object, returning the JsObj
given by the supplier otherwise.
|
JsObj |
TryObj.orElseThrow() |
Returns the computed JsObj if the parsed string is a well-formed json object, throwing an exception
otherwise.
|
default JsObj |
JsObj.remove(String key) |
Removes the key from this object if it's present.
|
JsObj |
JsObj.tail(String key) |
Returns a new object with all the entries of this json object except the one with the given key.
|
JsObj |
JsObj.union(JsObj that) |
Returns the union of this object and another given as a parameter.
|
JsObj |
JsObj.union_(JsObj that,
JsArray.TYPE ARRAY_AS) |
Returns the union of this object and another given as parameter applying recursively the union
to those elements which are Json of the same type and are located at the same key
and defining characteristics like order and duplicates occurrence in arrays with the given ARRAY_AS
parameter.
|
Modifier and Type | Method | Description |
---|---|---|
static Collector<JsPair,JsObj,JsObj> |
JsObj._collector_() |
Returns a collector that accumulates the pairs from a stream into an mutable object.
|
static Collector<JsPair,JsObj,JsObj> |
JsObj._collector_() |
Returns a collector that accumulates the pairs from a stream into an mutable object.
|
static Collector<JsPair,JsObj,JsObj> |
JsObj.collector() |
Returns a collector that accumulates the pairs from a stream into an immutable object.
|
static Collector<JsPair,JsObj,JsObj> |
JsObj.collector() |
Returns a collector that accumulates the pairs from a stream into an immutable object.
|
default Optional<JsObj> |
Json.getObj(String path) |
Returns the object located at the given path or
Optional.empty() if it doesn't exist or it's
not an object. |
default Optional<JsObj> |
Json.getObj(JsPath path) |
Returns the object located at the given path or
Optional.empty() if it doesn't exist or it's
not an object. |
Optional<JsObj> |
TryObj.toOptional() |
Returns the computed json object wrapped in an optional if the parsed string is a well-formed
json object, returning an empty optional otherwise.
|
Modifier and Type | Method | Description |
---|---|---|
default boolean |
JsObj.equals(JsObj that,
JsArray.TYPE ARRAY_AS) |
return true if this obj is equal to the given as a parameter.
|
JsObj |
JsObj.intersection(JsObj that,
JsArray.TYPE ARRAY_AS) |
Returns the intersection of this object and another, defining characteristics like order and duplicates
occurrence in arrays with the given ARRAY_AS parameter.
|
JsObj |
JsObj.intersection_(JsObj that,
JsArray.TYPE ARRAY_AS) |
Returns the intersection of this object and another given as parameter applying recursively
the intersection to those elements which are Json of the same type and are located at the same key
and defining characteristics like order and duplicates occurrence in arrays with the given ARRAY_AS
parameter.
|
JsObj |
JsObj.union(JsObj that) |
Returns the union of this object and another given as a parameter.
|
JsObj |
JsObj.union_(JsObj that,
JsArray.TYPE ARRAY_AS) |
Returns the union of this object and another given as parameter applying recursively the union
to those elements which are Json of the same type and are located at the same key
and defining characteristics like order and duplicates occurrence in arrays with the given ARRAY_AS
parameter.
|
Modifier and Type | Method | Description |
---|---|---|
T |
Json.filterObjs(BiPredicate<? super JsPath,? super JsObj> filter) |
Filters the pair of jsons in the first level parse this json, removing those that don't match
the predicate.
|
T |
Json.filterObjs_(BiPredicate<? super JsPath,? super JsObj> filter) |
Filters all the pair of jsons parse this json, removing those that don't match the predicate.
|
default boolean |
JsElem.isObj(Predicate<JsObj> predicate) |
Returns true if this elem is a JsObj and satisfies the given predicate
|
T |
Json.mapObjs(BiFunction<? super JsPath,? super JsObj,JsObj> fn) |
Maps the jsons in the first level parse this json.
|
T |
Json.mapObjs(BiFunction<? super JsPath,? super JsObj,JsObj> fn) |
Maps the jsons in the first level parse this json.
|
T |
Json.mapObjs(BiFunction<? super JsPath,? super JsObj,JsObj> fn,
BiPredicate<? super JsPath,? super JsObj> predicate) |
Maps the jsons in the first level parse this json that satisfies a given predicate.
|
T |
Json.mapObjs(BiFunction<? super JsPath,? super JsObj,JsObj> fn,
BiPredicate<? super JsPath,? super JsObj> predicate) |
Maps the jsons in the first level parse this json that satisfies a given predicate.
|
T |
Json.mapObjs(BiFunction<? super JsPath,? super JsObj,JsObj> fn,
BiPredicate<? super JsPath,? super JsObj> predicate) |
Maps the jsons in the first level parse this json that satisfies a given predicate.
|
T |
Json.mapObjs_(BiFunction<? super JsPath,? super JsObj,JsObj> fn) |
Maps all the jsons parse this json.
|
T |
Json.mapObjs_(BiFunction<? super JsPath,? super JsObj,JsObj> fn) |
Maps all the jsons parse this json.
|
T |
Json.mapObjs_(BiFunction<? super JsPath,? super JsObj,JsObj> fn,
BiPredicate<? super JsPath,? super JsObj> predicate) |
Maps all the jsons parse this json that satisfies a given predicate.
|
T |
Json.mapObjs_(BiFunction<? super JsPath,? super JsObj,JsObj> fn,
BiPredicate<? super JsPath,? super JsObj> predicate) |
Maps all the jsons parse this json that satisfies a given predicate.
|
T |
Json.mapObjs_(BiFunction<? super JsPath,? super JsObj,JsObj> fn,
BiPredicate<? super JsPath,? super JsObj> predicate) |
Maps all the jsons parse this json that satisfies a given predicate.
|
JsObj |
Try.objOrElse(Supplier<JsObj> other) |
Returns the computed JsObj if the parsed string is a well-formed json object, returning the JsObj
given by the supplier otherwise.
|
JsObj |
TryObj.orElse(Supplier<JsObj> other) |
Returns the computed JsObj if the parsed string is a well-formed json object, returning the JsObj
given by the supplier otherwise.
|
Copyright © 2019. All rights reserved.