Uses of Interface
jsonvalues.JsObj
-
-
Uses of JsObj in jsonvalues
Methods in jsonvalues that return JsObj 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)
this.intersection(that, SET)
returns an array with the elements that exist in boththis
andthat
this.intersection(that, MULTISET)
returns an array with the elements that exist in boththis
andthat
, being duplicates allowed.JsObj
JsObj. intersection_(JsObj that, JsArray.TYPE ARRAY_AS)
this.intersection_(that)
behaves asthis.intersection(that, LIST)
, but for those elements that are containers of the same type and are located at the same position, the result is their intersection.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.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)
returnsthis
json object plus those pairs from the given json objectthat
which keys don't exist inthis
.JsObj
JsObj. union_(JsObj that, JsArray.TYPE ARRAY_AS)
behaves like theunion(JsObj)
but, for those keys that exit in boththis
andthat
json objects, which associated elements are **containers of the same type**, the result is their union.Methods in jsonvalues that return types with arguments of type JsObj 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(JsPath path)
Returns the object located at the given path orOptional.empty()
if it doesn't exist or it's not an object.default TryPatch<JsObj>
JsObj. patch(JsArray ops)
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.Methods in jsonvalues with parameters of type JsObj 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)
this.intersection(that, SET)
returns an array with the elements that exist in boththis
andthat
this.intersection(that, MULTISET)
returns an array with the elements that exist in boththis
andthat
, being duplicates allowed.JsObj
JsObj. intersection_(JsObj that, JsArray.TYPE ARRAY_AS)
this.intersection_(that)
behaves asthis.intersection(that, LIST)
, but for those elements that are containers of the same type and are located at the same position, the result is their intersection.JsObj
JsObj. union(JsObj that)
returnsthis
json object plus those pairs from the given json objectthat
which keys don't exist inthis
.JsObj
JsObj. union_(JsObj that, JsArray.TYPE ARRAY_AS)
behaves like theunion(JsObj)
but, for those keys that exit in boththis
andthat
json objects, which associated elements are **containers of the same type**, the result is their union.Method parameters in jsonvalues with type arguments of type JsObj 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 ifPredicateElse 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 ifPredicateElse the predicate.default <T> Trampoline<T>
JsObj. ifEmptyElse(Trampoline<T> empty, BiFunction<Map.Entry<String,JsElem>,JsObj,Trampoline<T>> fn)
<T> T
JsPair. ifJsonElse(BiFunction<JsPath,JsObj,T> ifJsOb, BiFunction<JsPath,JsArray,T> ifJsArr, BiFunction<JsPath,JsElem,T> ifNotJson)
Declarative way of implementing an if(obj)return T; else if(array) return T; else return T; where T is computed by the given functionsstatic <T> Function<JsElem,T>
MatchExp. ifJsonElse(Function<? super JsObj,T> ifObj, Function<? super JsArray,T> ifArr, Function<? super JsElem,T> ifValue)
return a matching expression to extract objs and arrays out of json elements.static <T> Function<JsElem,T>
MatchExp. ifObjElse(Function<? super JsObj,T> ifObj, Function<? super JsElem,T> ifNotObj)
return a matching expression to extract json objects out of json elements.default boolean
JsElem. isObj(Predicate<JsObj> predicate)
Returns true if this elem is a JsObj and satisfies the given predicateT
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.Constructors in jsonvalues with parameters of type JsObj Constructor Description Try(JsObj obj)
TryObj(JsObj obj)
-