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(String path)Returns the element located at the given path orJsNothingif it doesn't exist.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 Map.Entry<String,JsElem>JsObj. head()Returns a pair with an arbitrary key of this object and its associated element.static <T> Function<JsElem,T>MatchFns. ifArrElse(Function<? super JsArray,T> ifArr, Function<? super JsElem,T> ifNotArr)Declarative way of implementing if(this.isArray()) return ifArr.apply(this.asJsArray()) else return ifNotArr.apply(this)static <T> Function<JsElem,T>MatchFns. ifBoolElse(Function<? super Boolean,T> ifBoolean, Function<? super JsElem,T> ifNotBoolean)Declarative way of implementing if(this.isBool()) return ifBoolean.get() else ifNotBoolean.get()static <T> Function<JsElem,T>MatchFns. ifDecimalElse(DoubleFunction<T> ifDouble, Function<BigDecimal,T> ifBigDecimal, Function<? super JsElem,T> ifOther)Declarative way of returning an object based on the type of decimal number this element isstatic <T> Function<JsElem,T>MatchFns. ifIntegralElse(IntFunction<T> ifInt, LongFunction<T> ifLong, Function<BigInteger,T> ifBigInt, Function<? super JsElem,T> ifOther)static <T> Function<JsElem,T>MatchFns. ifJsonElse(Function<? super JsObj,T> ifObj, Function<? super JsArray,T> ifArr, Function<? super JsElem,T> ifValue)static <T> Function<JsElem,T>MatchFns. ifJsonElse(Function<Json<?>,T> ifJson, Function<JsElem,T> ifNotJson)static <T> Function<JsElem,T>MatchFns. ifNothingElse(Supplier<T> nothingSupplier, Function<JsElem,T> elseFn)static <T> Function<JsElem,T>MatchFns. ifObjElse(Function<? super JsObj,T> ifObj, Function<? super JsElem,T> ifNotObj)static <T> Function<JsElem,T>MatchFns. ifPredicateElse(Predicate<JsElem> predicate, Function<JsElem,T> ifTrue, Function<JsElem,T> ifFalse)static <T> Function<JsElem,T>MatchFns. ifStrElse(Function<? super String,T> ifStr, Function<? super JsElem,T> ifNotStr)static Predicate<JsElem>MatchFns. isSameType(JsElem that)Methods in jsonvalues with parameters of type JsElem Modifier and Type Method Description static JsArrayJsArray. _of_(JsElem e)Returns a mutable one-element array.static JsArrayJsArray. _of_(JsElem e, JsElem e1)Returns a mutable two-element array.static JsArrayJsArray. _of_(JsElem e, JsElem e1, JsElem e2)Returns a mutable three-element array.static JsArrayJsArray. _of_(JsElem e, JsElem e1, JsElem e2, JsElem e3)Returns a mutable four-element array.static JsArrayJsArray. _of_(JsElem e, JsElem e1, JsElem e2, JsElem e3, JsElem e4)Returns a mutable five-element array.static JsArrayJsArray. _of_(JsElem e, JsElem e1, JsElem e2, JsElem e3, JsElem e4, JsElem... rest)Returns a mutable array containing an arbitrary number of elements.static JsObjJsObj. _of_(String key, JsElem el)Returns a mutable one-pair object.static JsObjJsObj. _of_(String key1, JsElem el1, String key2, JsElem el2)Returns a mutable two-pair object.static JsObjJsObj. _of_(String key1, JsElem el1, String key2, JsElem el2, String key3, JsElem el3)Returns a mutable three-pair object.static JsObjJsObj. _of_(String key1, JsElem el1, String key2, JsElem el2, String key3, JsElem el3, String key4, JsElem el4)Returns a mutable four-pair object.static JsObjJsObj. _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 JsObjJsObj. _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.JsArrayJsArray. append(JsElem elem, JsElem... others)Adds one or more elements, starting from the first, to the back of this array.default TJson. append(String path, JsElem elem)Appends one element to the array located at the given path in this json.default TJson. append(String 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.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.booleanJson. 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)static Predicate<JsElem>MatchFns. isSameType(JsElem that)default TJson. merge(String 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.static JsArrayJsArray. of(JsElem e)Returns an immutable one-element array.static JsArrayJsArray. of(JsElem e, JsElem e1)Returns an immutable two-element array.static JsArrayJsArray. of(JsElem e, JsElem e1, JsElem e2)Returns an immutable three-element array.static JsArrayJsArray. of(JsElem e, JsElem e1, JsElem e2, JsElem e3)Returns an immutable four-element array.static JsArrayJsArray. of(JsElem e, JsElem e1, JsElem e2, JsElem e3, JsElem e4)Returns an immutable five-element array.static JsArrayJsArray. of(JsElem e, JsElem e1, JsElem e2, JsElem e3, JsElem e4, JsElem... rest)Returns an immutable array.static JsObjJsObj. of(String key, JsElem el)Returns an immutable one-element object.static JsObjJsObj. of(String key1, JsElem el1, String key2, JsElem el2)Returns a two-element immutable object.static JsObjJsObj. of(String key1, JsElem el1, String key2, JsElem el2, String key3, JsElem el3)Returns a three-element immutable json object.static JsObjJsObj. of(String key1, JsElem el1, String key2, JsElem el2, String key3, JsElem el3, String key4, JsElem el4)Returns a four-element immutable object.static JsObjJsObj. 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 JsObjJsObj. 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(String path, JsElem elem)Returns a json pair from the path-like string and the json element.static JsPairJsPair. of(JsPath path, JsElem elem)Returns a json pair from the path and the json element.JsArrayJsArray. prepend(JsElem elem, JsElem... others)Adds one or more elements, starting from the last, to the front of this array.default TJson. prepend(String path, JsElem elem)prepends one element to the array located at the path in this json.default TJson. prepend(String path, JsElem elem, JsElem... others)Prepends one or more elements, starting from the first, to the array located at the path in this json.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(String path, JsElem element)Inserts the element at the path in this json, replacing any existing element and filling withJsNullempty indexes in arrays when necessary.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.default longJson. times(JsElem e)default longJson. times_(JsElem e)Method parameters in jsonvalues with type arguments of type JsElem Modifier and Type Method Description static JsArrayJsArray. _of_(List<JsElem> list)Returns a mutable array copying the reference of the collection of elements.static JsObjJsObj. _of_(Map<String,JsElem> map)Returns a mutable object from a map of elements.default TJson. appendIfPresent(String 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 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>MatchFns. ifNothingElse(Supplier<T> nothingSupplier, Function<JsElem,T> elseFn)static <T> Function<JsElem,T>MatchFns. ifPredicateElse(Predicate<JsElem> predicate, Function<JsElem,T> ifTrue, Function<JsElem,T> ifFalse)static <T> Function<JsElem,T>MatchFns. ifPredicateElse(Predicate<JsElem> predicate, Function<JsElem,T> ifTrue, Function<JsElem,T> ifFalse)JsPairJsPair. 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 parse this json.TJson. mapElems(Function<? super JsPair,? extends JsElem> fn, Predicate<? super JsPair> predicate)Maps the values in the first level parse this json that satisfies a given predicate.TJson. mapElems_(Function<? super JsPair,? extends JsElem> fn)Maps all the values parse this json.TJson. mapElems_(Function<? super JsPair,? extends JsElem> fn, Predicate<? super JsPair> predicate)Maps all the values parse this json that satisfies a given predicate.default TJson. merge(String 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(String 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(String 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.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.static JsArrayJsArray. of(Collection<? extends JsElem> list)Returns an immutable array from the collection of elements.static JsObjJsObj. of(Map<String,JsElem> map)Returns a immutable object from a map of elements.default TJson. prependIfPresent(String 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.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.default TJson. put(String path, Function<? super JsElem,? extends JsElem> fn)Inserts the element returned by the function at the path in this json, replacing any existing element in the path and filling withJsNullempty indexes in arrays when necessary.default TJson. put(String path, Function<? super JsElem,? extends JsElem> fn)Inserts the element returned by the function at the path in this json, replacing any existing element in the path 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 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 path in this json, replacing any existing element and filling withJsNullempty indexes in arrays when necessary.default TJson. putIf(Predicate<? super JsElem> predicate, String 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, String 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, String 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. 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(String 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. 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(String 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(String 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.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.ParseOptionsParseOptions. withElemMap(Function<JsPair,JsElem> map)adds a function to this builder to map the elements of the json to be parsed
-