Uses of Interface
jsonvalues.JsObj
-
-
Uses of JsObj in jsonvalues
Methods in jsonvalues that return JsObj Modifier and Type Method Description default JsObj
JsElem. asJsObj()
JsObj
ImmutableJsons.ImmutableJsObjs. empty()
Returns the immutable empty object.JsObj
MutableJsons.MutableJsObjs. 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.JsObj
ImmutableJsons.ImmutableJsObjs. of(String key, JsElem el)
Returns a one-element immutable object.JsObj
ImmutableJsons.ImmutableJsObjs. of(String key1, JsElem el1, String key2, JsElem el2)
Returns a two-element immutable object.JsObj
ImmutableJsons.ImmutableJsObjs. of(String key1, JsElem el1, String key2, JsElem el2, String key3, JsElem el3)
Returns a three-element immutable object.JsObj
ImmutableJsons.ImmutableJsObjs. of(String key1, JsElem el1, String key2, JsElem el2, String key3, JsElem el3, String key4, JsElem el4)
Returns a four-element immutable object.JsObj
ImmutableJsons.ImmutableJsObjs. 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.JsObj
ImmutableJsons.ImmutableJsObjs. 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.JsObj
ImmutableJsons.ImmutableJsObjs. of(JsPair pair, JsPair... others)
Returns an immutable object from one or more pairs.JsObj
MutableJsons.MutableJsObjs. of(String key, JsElem el)
Returns a one-element mutable object.JsObj
MutableJsons.MutableJsObjs. of(String key1, JsElem el1, String key2, JsElem el2)
Returns a two-element mutable object.JsObj
MutableJsons.MutableJsObjs. of(String key1, JsElem el1, String key2, JsElem el2, String key3, JsElem el3)
Returns a three-element mutable object.JsObj
MutableJsons.MutableJsObjs. of(String key1, JsElem el1, String key2, JsElem el2, String key3, JsElem el3, String key4, JsElem el4)
Returns a four-element mutable object.JsObj
MutableJsons.MutableJsObjs. 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 mutable object.JsObj
MutableJsons.MutableJsObjs. 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 mutable object.JsObj
MutableJsons.MutableJsObjs. of(JsPair pair, JsPair... others)
Returns an immutable object from one or more pairs.JsObj
ImmutableJsons.ImmutableJsObjs. ofIterable(Iterable<Map.Entry<String,JsElem>> xs)
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
ImmutableJsons.ImmutableJsObjs. toImmutable(JsObj mutable)
JsObj
MutableJsons.MutableJsObjs. toMutable(JsObj map)
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 Collector<JsPair,JsObj,JsObj>
MutableJsons.MutableJsObjs. collector()
Returns a collector that accumulates the pairs from a stream into an mutable object.Collector<JsPair,JsObj,JsObj>
MutableJsons.MutableJsObjs. collector()
Returns a collector that accumulates the pairs from a stream into an mutable 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.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.boolean
JsObj. same(JsObj other)
JsObj
ImmutableJsons.ImmutableJsObjs. toImmutable(JsObj mutable)
JsObj
MutableJsons.MutableJsObjs. toMutable(JsObj map)
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 of 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 of 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 of this json.T
Json. mapObjs(BiFunction<? super JsPath,? super JsObj,JsObj> fn)
Maps the jsons in the first level of 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 of 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 of 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 of this json that satisfies a given predicate.T
Json. mapObjs_(BiFunction<? super JsPath,? super JsObj,JsObj> fn)
Maps all the jsons of this json.T
Json. mapObjs_(BiFunction<? super JsPath,? super JsObj,JsObj> fn)
Maps all the jsons of this json.T
Json. mapObjs_(BiFunction<? super JsPath,? super JsObj,JsObj> fn, BiPredicate<? super JsPath,? super JsObj> predicate)
Maps all the jsons of 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 of 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 of 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)
-