Uses of Interface
jsonvalues.JsElem
-
-
Uses of JsElem in jsonvalues
Subinterfaces of JsElem in jsonvalues Modifier and Type Interface Description interfaceJsArrayRepresents a json array, which is an ordered list of elements.interfaceJsNumberRepresents an immutable json number.interfaceJsObjRepresents a json object, which is an unordered set of name/element pairs.interfaceJson<T extends Json<T>>Represents a json of type T, where T is the type of the container, either a JsObj or a JsArray.Classes in jsonvalues that implement JsElem Modifier and Type Class Description classJsBigDecRepresents an immutable json number of type BigDecimal.classJsBigIntRepresents an immutable json number of type BigInteger.classJsBoolRepresents an immutable json boolean.classJsDoubleRepresents an immutable json number of type double.classJsIntRepresents an immutable json number of type integer.classJsLongRepresents an immutable json number of type long.classJsNothingIt's a special json element that represents 'nothing'.classJsNullRepresents null, which a valid json value.classJsStrRepresents an immutable json string.Fields in jsonvalues declared as JsElem Modifier and Type Field Description JsElemJsPair. elemthe json element.Methods in jsonvalues that return JsElem Modifier and Type Method Description default JsElemJson. get(JsPath path)Returns the element located at the given path orJsNothingif it doesn't exist.JsElemJson. get(Position position)Returns the element located at the key or index specified by the given position orJsNothingif it doesn't exist.JsElemJsArray. head()Returns the first element of this array.JsElemJsArray. last()Returns the last element of this array.Methods in jsonvalues that return types with arguments of type JsElem Modifier and Type Method Description static Consumer<JsElem>MatchExp. accept(Consumer<JsElem> ifValue, Consumer<JsObj> ifObj, Consumer<JsArray> ifArray)Declarative way of consuming an element based on its typeMap.Entry<String,JsElem>JsObj. head()Returns a pair with an arbitrary key of this object and its associated element.static <T> Function<JsElem,T>MatchExp. ifArrElse(Function<? super JsArray,T> ifArr, Function<? super JsElem,T> ifNotArr)return a matching expression to extract arrays out of json elements.static <T> Function<JsElem,T>MatchExp. ifBoolElse(Function<? super Boolean,T> ifBoolean, Function<? super JsElem,T> ifNotBoolean)return a matching expression to extract booleans out of json elements.static <T> Function<JsElem,T>MatchExp. ifDecimalElse(DoubleFunction<T> ifDouble, Function<BigDecimal,T> ifBigDecimal, Function<? super JsElem,T> ifOther)return a matching expression to extract decimal numbers out of json elements.static <T> Function<JsElem,T>MatchExp. ifIntegralElse(IntFunction<T> ifInt, LongFunction<T> ifLong, Function<BigInteger,T> ifBigInt, Function<? super JsElem,T> ifOther)return a matching expression to extract integral numbers out of json elements.static <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. ifJsonElse(Function<Json<?>,T> ifJson, Function<JsElem,T> ifNotJson)return a matching expression to extract jsons out of json elements.static <T> Function<JsElem,T>MatchExp. ifNothingElse(Supplier<T> nothingSupplier, Function<JsElem,T> elseFn)return a matching expression to extract JsNothing 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.static <T> Function<JsElem,T>MatchExp. ifPredicateElse(Predicate<JsElem> predicate, Function<JsElem,T> ifTrue, Function<JsElem,T> ifFalse)declarative way of implementing an if-else using high order functionsstatic <T> Function<JsElem,T>MatchExp. ifStrElse(Function<? super String,T> ifStr, Function<? super JsElem,T> ifNotStr)returns a matching expression to extract strings out of json elements.Methods in jsonvalues with parameters of type JsElem Modifier and Type Method Description ImmutableSeqImmutableSeq. add(int index, JsElem ele)adds an element at the index, shifting elements at greater or equal indexes one position to the right.JsArrayJsArray. add(int index, JsElem elem)default TJson. add(JsPath path, JsElem elem)Inserts the given element at the given path in this json, replacing any existing element at that path.voidMutableSeq. add(int index, JsElem ele)adds an element at the index, shifting elements at greater or equal indexes one position to the right.Patch.BuilderPatch.Builder. add(String path, JsElem value)ADD operation.JsArrayJsArray. append(JsElem elem, JsElem... others)Adds one or more elements, starting from the first, to the back of this array.TJson. append(JsPath path, JsElem elem)Appends one element to the array located at the given path in this json.default TJson. append(JsPath path, JsElem elem, JsElem... others)Appends one or more elements, starting from the first, to the array located at the given path in this json.ImmutableSeqImmutableSeq. appendBack(JsElem elem)appends the element to the back of the seqvoidMutableSeq. appendBack(JsElem elem)appends the element to the back of the seqImmutableSeqImmutableSeq. appendFront(JsElem elem)appends the element to the front of the seqvoidMutableSeq. appendFront(JsElem elem)appends the element to the front of the seqbooleanJson. containsElem(JsElem element)Returns true if this json contains the given element in the first level.default booleanJson. containsElem_(JsElem element)Returns true if this json or any of its elements, contains the given element.default booleanJson. equals(JsElem elem, JsArray.TYPE ARRAY_AS)default booleanJsElem. isSameType(JsElem that)returns true if this elem and the given have the same typedefault TJson. merge(JsPath path, JsElem value, BiFunction<? super JsElem,? super JsElem,? extends JsElem> fn)If the given path is not already associated with a value or is associated with null, associates it with the given value.JsArrayImmutableJsons.ImmutableJsArrays. of(JsElem e)JsArrayImmutableJsons.ImmutableJsArrays. of(JsElem e, JsElem e1)Returns an immutable two-element array.JsArrayImmutableJsons.ImmutableJsArrays. of(JsElem e, JsElem e1, JsElem e2)Returns an immutable three-element array.JsArrayImmutableJsons.ImmutableJsArrays. of(JsElem e, JsElem e1, JsElem e2, JsElem e3)Returns an immutable four-element array.JsArrayImmutableJsons.ImmutableJsArrays. of(JsElem e, JsElem e1, JsElem e2, JsElem e3, JsElem e4)Returns an immutable five-element array.JsArrayImmutableJsons.ImmutableJsArrays. of(JsElem e, JsElem e1, JsElem e2, JsElem e3, JsElem e4, JsElem... rest)Returns an immutable array.JsObjImmutableJsons.ImmutableJsObjs. of(String key, JsElem el)Returns a one-element immutable object.JsObjImmutableJsons.ImmutableJsObjs. of(String key1, JsElem el1, String key2, JsElem el2)Returns a two-element immutable object.JsObjImmutableJsons.ImmutableJsObjs. of(String key1, JsElem el1, String key2, JsElem el2, String key3, JsElem el3)Returns a three-element immutable object.JsObjImmutableJsons.ImmutableJsObjs. of(String key1, JsElem el1, String key2, JsElem el2, String key3, JsElem el3, String key4, JsElem el4)Returns a four-element immutable object.JsObjImmutableJsons.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.JsObjImmutableJsons.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.static JsPairJsPair. of(JsPath path, JsElem elem)Returns a json pair from the path and the json element.JsArrayMutableJsons.MutableJsArrays. of(JsElem e)Returns a mutable one-element array.JsArrayMutableJsons.MutableJsArrays. of(JsElem e, JsElem e1)Returns an mutable two-element array.JsArrayMutableJsons.MutableJsArrays. of(JsElem e, JsElem e1, JsElem e2)Returns an mutable three-element array.JsArrayMutableJsons.MutableJsArrays. of(JsElem e, JsElem e1, JsElem e2, JsElem e3)Returns a mutable four-element array.JsArrayMutableJsons.MutableJsArrays. of(JsElem e, JsElem e1, JsElem e2, JsElem e3, JsElem e4)Returns an mutable five-element array.JsArrayMutableJsons.MutableJsArrays. of(JsElem e, JsElem e1, JsElem e2, JsElem e3, JsElem e4, JsElem... rest)Returns an mutable array.JsObjMutableJsons.MutableJsObjs. of(String key, JsElem el)Returns a one-element mutable object.JsObjMutableJsons.MutableJsObjs. of(String key1, JsElem el1, String key2, JsElem el2)Returns a two-element mutable object.JsObjMutableJsons.MutableJsObjs. of(String key1, JsElem el1, String key2, JsElem el2, String key3, JsElem el3)Returns a three-element mutable object.JsObjMutableJsons.MutableJsObjs. of(String key1, JsElem el1, String key2, JsElem el2, String key3, JsElem el3, String key4, JsElem el4)Returns a four-element mutable object.JsObjMutableJsons.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.JsObjMutableJsons.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.JsArrayJsArray. prepend(JsElem elem, JsElem... others)Adds one or more elements, starting from the last, to the front of this array.TJson. prepend(JsPath path, JsElem elem)prepends one element to the array located at the path in this json.default TJson. prepend(JsPath path, JsElem elem, JsElem... others)prepends one or more elements, starting from the first, to the array located at the path in this json.default TJson. put(JsPath path, JsElem element)Inserts the element at the path in this json, replacing any existing element and filling withJsNullempty indexes in arrays when necessary.Patch.BuilderPatch.Builder. replace(String path, JsElem value)REPLACE operation.Patch.BuilderPatch.Builder. test(String path, JsElem value)TEST operation.default longJson. times(JsElem e)default longJson. times_(JsElem e)ImmutableMapImmutableMap. update(String key, JsElem je)updates the element associated with the key with a new element.ImmutableSeqImmutableSeq. update(int index, JsElem ele)updates the element located at the index with a new element.voidMutableMap. update(String key, JsElem je)updates the element associated with the key with a new element.voidMutableSeq. update(int index, JsElem ele)updates the element located at the index with a new element.Method parameters in jsonvalues with type arguments of type JsElem Modifier and Type Method Description static Consumer<JsElem>MatchExp. accept(Consumer<JsElem> ifValue, Consumer<JsObj> ifObj, Consumer<JsArray> ifArray)Declarative way of consuming an element based on its typeTJson. add(JsPath path, Function<? super JsElem,? extends JsElem> fn)Inserts the element returned by the function at the given path in this json, replacing any existing element at that path.TJson. add(JsPath path, Function<? super JsElem,? extends JsElem> fn)Inserts the element returned by the function at the given path in this json, replacing any existing element at that path.default TJson. appendIfPresent(JsPath path, Supplier<? extends JsElem> supplier)Appends the element given by the supplier, to the array located at the given path in this json, returning the same this instance if the array is not present.default <T> Trampoline<T>JsArray. ifEmptyElse(Trampoline<T> empty, BiFunction<JsElem,JsArray,Trampoline<T>> fn)default <T> Trampoline<T>JsObj. ifEmptyElse(Trampoline<T> empty, BiFunction<Map.Entry<String,JsElem>,JsObj,Trampoline<T>> fn)static <T> Function<JsElem,T>MatchExp. ifNothingElse(Supplier<T> nothingSupplier, Function<JsElem,T> elseFn)return a matching expression to extract JsNothing out of json elements.static <T> Function<JsElem,T>MatchExp. ifPredicateElse(Predicate<JsElem> predicate, Function<JsElem,T> ifTrue, Function<JsElem,T> ifFalse)declarative way of implementing an if-else using high order functionsstatic <T> Function<JsElem,T>MatchExp. ifPredicateElse(Predicate<JsElem> predicate, Function<JsElem,T> ifTrue, Function<JsElem,T> ifFalse)declarative way of implementing an if-else using high order functionsJsPairJsPair. mapElem(UnaryOperator<JsElem> map)Returns a new pair with the same path and a new element result of applying the mapping functionTJson. mapElems(Function<? super JsPair,? extends JsElem> fn)Maps the values in the first level of this json.TJson. mapElems(Function<? super JsPair,? extends JsElem> fn, Predicate<? super JsPair> predicate)Maps the values in the first level of this json that satisfies a given predicate.TJson. mapElems_(Function<? super JsPair,? extends JsElem> fn)Maps all the values of this json.TJson. mapElems_(Function<? super JsPair,? extends JsElem> fn, Predicate<? super JsPair> predicate)Maps all the values of this json that satisfies a given predicate.default TJson. merge(JsPath path, JsElem value, BiFunction<? super JsElem,? super JsElem,? extends JsElem> fn)If the given path is not already associated with a value or is associated with null, associates it with the given value.default TJson. merge(JsPath path, JsElem value, BiFunction<? super JsElem,? super JsElem,? extends JsElem> fn)If the given path is not already associated with a value or is associated with null, associates it with the given value.default TJson. merge(JsPath path, JsElem value, BiFunction<? super JsElem,? super JsElem,? extends JsElem> fn)If the given path is not already associated with a value or is associated with null, associates it with the given value.JsArrayImmutableJsons.ImmutableJsArrays. ofIterable(Iterable<JsElem> iterable)returns an immutable json array from an iterable of json elementsJsObjImmutableJsons.ImmutableJsObjs. ofIterable(Iterable<Map.Entry<String,JsElem>> xs)JsArrayMutableJsons.MutableJsArrays. ofIterable(Iterable<JsElem> iterable)default TJson. prependIfPresent(JsPath path, Supplier<JsElem> supplier)Prepends one element given by a supplier, to the array located at the given path in this json, returning the same this instance if the array is not present.TJson. put(JsPath path, Function<? super JsElem,? extends JsElem> fn)Inserts the element returned by the function at the given path in this json, replacing any existing element and filling withJsNullempty indexes in arrays when necessary.TJson. put(JsPath path, Function<? super JsElem,? extends JsElem> fn)Inserts the element returned by the function at the given path in this json, replacing any existing element and filling withJsNullempty indexes in arrays when necessary.default TJson. putIf(Predicate<? super JsElem> predicate, JsPath path, Function<? super JsElem,? extends JsElem> fn)Inserts at the given path in this json, if the existing element satisfies the predicate, a new element returned by the function.default TJson. putIf(Predicate<? super JsElem> predicate, JsPath path, Function<? super JsElem,? extends JsElem> fn)Inserts at the given path in this json, if the existing element satisfies the predicate, a new element returned by the function.default TJson. putIf(Predicate<? super JsElem> predicate, JsPath path, Function<? super JsElem,? extends JsElem> fn)Inserts at the given path in this json, if the existing element satisfies the predicate, a new element returned by the function.default TJson. putIfAbsent(JsPath path, Supplier<? extends JsElem> supplier)Inserts at the given path in this json, if no element is present, the element returned by the supplier, replacing any existing element in the path and filling withJsNullempty positions in arrays when necessary.default TJson. putIfPresent(JsPath path, Function<? super JsElem,? extends JsElem> fn)Inserts at the given path in this json, if some element is present, the element returned by the function.default TJson. putIfPresent(JsPath path, Function<? super JsElem,? extends JsElem> fn)Inserts at the given path in this json, if some element is present, the element returned by the function.ParseBuilderParseBuilder. withElemMap(Function<? super JsPair,? extends JsElem> map)adds a function to this builder to map the elements of the json.
-