Uses of Class
jsonvalues.JsArray
-
Packages that use JsArray Package Description com.dslplatform.json the library dsl-json has been extended with some customization.com.dslplatform.json.parsers com.dslplatform.json.serializers jsonvalues json-values is a one-package and zero-dependency library to work with jsons in a declarative and functional way.jsonvalues.console jsonvalues.future jsonvalues.gen jsonvalues.spec -
-
Uses of JsArray in com.dslplatform.json
Methods in com.dslplatform.json that return JsArray Modifier and Type Method Description JsArray
MyDslJson. deserializeToJsArray(byte[] bytes, JsSpecParser parser)
JsArray
MyDslJson. deserializeToJsArray(InputStream is, JsSpecParser parser)
-
Uses of JsArray in com.dslplatform.json.parsers
Methods in com.dslplatform.json.parsers that return JsArray Modifier and Type Method Description JsArray
JsArraySpecParser. array(com.dslplatform.json.JsonReader<?> reader)
-
Uses of JsArray in com.dslplatform.json.serializers
Methods in com.dslplatform.json.serializers with parameters of type JsArray Modifier and Type Method Description void
JsArraySerializer. write(com.dslplatform.json.JsonWriter writer, JsArray list)
Method parameters in com.dslplatform.json.serializers with type arguments of type JsArray Modifier and Type Method Description void
JsValueSerializer. setArraySerializer(com.dslplatform.json.JsonWriter.WriteObject<JsArray> arraySerializer)
-
Uses of JsArray in jsonvalues
Fields in jsonvalues declared as JsArray Modifier and Type Field Description static JsArray
JsArray. EMPTY
Methods in jsonvalues that return JsArray Modifier and Type Method Description JsArray
JsArray. append(JsPath path, JsValue elem)
JsArray
JsArray. append(JsValue e, JsValue... others)
Adds one or more elements, starting from the first, to the back of this array.JsArray
JsArray. appendAll(JsArray array)
Adds all the elements of the given array, starting from the head, to the back of this array.JsArray
JsArray. appendAll(JsPath path, JsArray elems)
static JsArray
JsArray. empty()
JsArray
JsArray. filterAllKeys(Predicate<? super JsPair> filter)
JsArray
JsArray. filterAllObjs(BiPredicate<? super JsPath,? super JsObj> filter)
JsArray
JsArray. filterAllValues(Predicate<? super JsPair> filter)
JsArray
JsArray. filterKeys(Predicate<? super JsPair> filter)
JsArray
JsArray. filterObjs(BiPredicate<? super JsPath,? super JsObj> filter)
JsArray
JsArray. filterValues(Predicate<? super JsPair> filter)
JsArray
JsObj. getArray(String key)
Returns the array located at the given key or null if it doesn't exist or it's not an array.default JsArray
Json. getArray(JsPath path)
Returns the array located at the given path or null if it doesn't exist or it's not an array.JsArray
JsArray. init()
Returns all the elements of this array except the last one.JsArray
JsArray. intersection(JsArray that, JsArray.TYPE ARRAY_AS)
this.intersection(that, SET)
returns an array with the elements that exist in boththis
andthat
.JsArray
JsArray. intersectionAll(JsArray that)
this.intersectionAll(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.JsArray
JsArray. mapAllKeys(Function<? super JsPair,String> fn)
JsArray
JsArray. mapAllKeys(Function<? super JsPair,String> fn, Predicate<? super JsPair> predicate)
JsArray
JsArray. mapAllObjs(BiFunction<? super JsPath,? super JsObj,JsObj> fn)
JsArray
JsArray. mapAllObjs(BiFunction<? super JsPath,? super JsObj,JsObj> fn, BiPredicate<? super JsPath,? super JsObj> predicate)
JsArray
JsArray. mapAllValues(Function<? super JsPair,? extends JsValue> fn)
JsArray
JsArray. mapAllValues(Function<? super JsPair,? extends JsValue> fn, Predicate<? super JsPair> predicate)
JsArray
JsArray. mapKeys(Function<? super JsPair,String> fn)
JsArray
JsArray. mapKeys(Function<? super JsPair,String> fn, Predicate<? super JsPair> predicate)
JsArray
JsArray. mapObjs(BiFunction<? super JsPath,? super JsObj,JsObj> fn)
JsArray
JsArray. mapObjs(BiFunction<? super JsPath,? super JsObj,JsObj> fn, BiPredicate<? super JsPath,? super JsObj> predicate)
JsArray
JsArray. mapValues(Function<? super JsPair,? extends JsValue> fn)
JsArray
JsArray. mapValues(Function<? super JsPair,? extends JsValue> fn, Predicate<? super JsPair> predicate)
static JsArray
JsArray. of(boolean bool, boolean... others)
Returns an immutable array from one or more booleans.static JsArray
JsArray. of(double number, double... others)
Returns an immutable array from one or more doubles.static JsArray
JsArray. of(int number, int... others)
Returns an immutable array from one or more integers.static JsArray
JsArray. of(long number, long... others)
Returns an immutable array from one or more longs.static JsArray
JsArray. of(String str, String... others)
Returns an immutable array from one or more strings.static JsArray
JsArray. of(BigInteger number, BigInteger... others)
Returns an immutable array from one or more big integers.static JsArray
JsArray. of(JsPair pair, JsPair... others)
Returns an immutable array from one or more pairs.static JsArray
JsArray. of(JsValue e)
static JsArray
JsArray. of(JsValue e, JsValue e1)
Returns an immutable two-element array.static JsArray
JsArray. of(JsValue e, JsValue e1, JsValue e2)
Returns an immutable three-element array.static JsArray
JsArray. of(JsValue e, JsValue e1, JsValue e2, JsValue e3)
Returns an immutable four-element array.static JsArray
JsArray. of(JsValue e, JsValue e1, JsValue e2, JsValue e3, JsValue e4)
Returns an immutable five-element array.static JsArray
JsArray. of(JsValue e, JsValue e1, JsValue e2, JsValue e3, JsValue e4, JsValue... rest)
Returns an immutable array.static JsArray
JsArray. ofIterable(Iterable<? extends JsValue> iterable)
returns an immutable json array from an iterable of json elementsstatic JsArray
JsArray. parse(String str)
Tries to parse the string into an immutable json array.static JsArray
JsArray. parse(String str, ParseBuilder builder)
JsArray
JsArray. prepend(JsPath path, JsValue elem)
JsArray
JsArray. prepend(JsValue e, JsValue... others)
Adds one or more elements, starting from the last, to the front of this array.JsArray
JsArray. prependAll(JsArray array)
Adds all the elements of the array, starting from the last, to the front of this array.JsArray
JsArray. prependAll(JsPath path, JsArray elems)
JsArray
JsArray. put(JsPath path, Function<? super JsValue,? extends JsValue> fn)
JsArray
JsArray. remove(JsPath path)
JsArray
JsArray. tail()
Returns a json array consisting of all elements of this array except the first one.default JsArray
JsValue. toJsArray()
JsArray
JsArray. union(JsArray that, JsArray.TYPE ARRAY_AS)
this.union(that, SET)
returnsthis
plus those elements fromthat
that don't exist inthis
.JsArray
JsArray. unionAll(JsArray that)
returnsthis
plus those elements fromthat
which position is>= this.size()
, and, at the positions where a container of the same type exists in boththis
andthat
, the result is their union.Methods in jsonvalues that return types with arguments of type JsArray Modifier and Type Method Description Optional<JsArray>
JsObj. getOptArray(String key)
Returns the array located at the given key orOptional.empty()
if it doesn't exist or it's not an array.default Optional<JsArray>
Json. getOptArray(JsPath path)
Returns the array located at the given path orOptional.empty()
if it doesn't exist or it's not an array.Methods in jsonvalues with parameters of type JsArray Modifier and Type Method Description JsArray
JsArray. appendAll(JsArray array)
Adds all the elements of the given array, starting from the head, to the back of this array.JsArray
JsArray. appendAll(JsPath path, JsArray elems)
JsObj
JsObj. appendAll(JsPath path, JsArray elems)
T
Json. appendAll(JsPath path, JsArray elems)
Appends all the elements of the array, starting from the head, to the array located at the given path in this json.boolean
JsArray. equals(JsArray array, JsArray.TYPE ARRAY_AS)
Returns true if this array is equal to the given as a parameter.JsArray
JsArray. intersection(JsArray that, JsArray.TYPE ARRAY_AS)
this.intersection(that, SET)
returns an array with the elements that exist in boththis
andthat
.JsArray
JsArray. intersectionAll(JsArray that)
this.intersectionAll(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.JsArray
JsArray. prependAll(JsArray array)
Adds all the elements of the array, starting from the last, to the front of this array.JsArray
JsArray. prependAll(JsPath path, JsArray elems)
JsObj
JsObj. prependAll(JsPath path, JsArray elems)
T
Json. prependAll(JsPath path, JsArray elems)
prepends all the elements of the array, starting from the head, to the array located at the path in this json.JsObj
JsObj. put(String key, JsArray value)
Inserts the array at the key in this json, replacing any existing element.JsObj
JsObj. putIfAbsent(String key, JsArray array)
Inserts at the given key in this json, if no element is present, the specified array.default T
Json. putIfAbsent(JsPath path, JsArray array)
Inserts at the given path in this json, if no element is present, the specified array, replacing any existing element in the path and filling withJsNull
empty positions in arrays when necessary.JsObj
JsObj. putIfPresent(String key, JsArray array)
Inserts at the given key in this json, if some element is present, the specified array.default T
Json. putIfPresent(JsPath path, JsArray array)
Inserts at the given path in this json, if some element is present, the specified integer.JsArray
JsArray. union(JsArray that, JsArray.TYPE ARRAY_AS)
this.union(that, SET)
returnsthis
plus those elements fromthat
that don't exist inthis
.JsArray
JsArray. unionAll(JsArray that)
returnsthis
plus those elements fromthat
which position is>= this.size()
, and, at the positions where a container of the same type exists in boththis
andthat
, the result is their union.Method parameters in jsonvalues with type arguments of type JsArray Modifier and Type Method Description default T
Json. appendAllIfPresent(JsPath path, Supplier<JsArray> supplier)
Appends all the elements of the array computed by the supplier, starting from the head, to an array located at the given path in this json, returning the same this instance if the array is not present, in which case, the supplier is not evaluated.static <T> Function<JsValue,T>
MatchExp. ifArrElse(Function<? super JsArray,T> ifArr, Function<? super JsValue,T> ifNotArr)
return a matching expression to extract arrays out of json elements.<T> Trampoline<T>
JsArray. ifEmptyElse(Trampoline<T> empty, BiFunction<JsValue,JsArray,Trampoline<T>> fn)
default boolean
JsValue. isArray(Predicate<JsArray> predicate)
Returns true if this elem is a JsArray and satisfies the given predicatedefault T
Json. prependAllIfPresent(JsPath path, Supplier<JsArray> supplier)
Prepends all the elements of the array computed by the supplier, starting from the head, to the array located at the path in this json, returning the same this instance if the array is not present, in which case, the supplier is not invoked. -
Uses of JsArray in jsonvalues.console
Methods in jsonvalues.console that return JsArray Modifier and Type Method Description JsArray
JsArrayIO. exec()
Methods in jsonvalues.console that return types with arguments of type JsArray Modifier and Type Method Description JsFuture<JsArray>
JsArrayIO. apply(JsPath path)
-
Uses of JsArray in jsonvalues.future
Methods in jsonvalues.future that return types with arguments of type JsArray Modifier and Type Method Description CompletableFuture<JsArray>
JsArrayFuture. get()
it triggers the execution of all the completable futures, combining the results into a JsArray -
Uses of JsArray in jsonvalues.gen
Methods in jsonvalues.gen that return types with arguments of type JsArray Modifier and Type Method Description static JsGen<JsArray>
JsGens. array(JsGen<?> gen, int size)
Creates an array generator of the given size, whose elements are chosen from the given generatorstatic JsGen<JsArray>
JsGens. arrayDistinct(JsGen<?> gen, int size)
Generates an array of values from the given generator, with the guarantee that the elements will be distinct.static JsGen<JsArray>
JsGens. arrayDistinct(JsGen<?> gen, int size, int maxTries)
Generates an array of values from the given generator, with the guarantee that the elements will be distinct.static JsGen<JsArray>
JsGens. tuple(JsGen<?> gen, JsGen<?>... others)
Creates a tuple generator from the given generators. -
Uses of JsArray in jsonvalues.spec
Methods in jsonvalues.spec that return JsArray Modifier and Type Method Description JsArray
JsArrayParser. parse(byte[] bytes)
parses an array of bytes into a Json array that must conform the spec of the parser.JsArray
JsArrayParser. parse(InputStream inputstream)
parses an input stream of bytes into a Json array that must conform the spec of the parser.JsArray
JsArrayParser. parse(String str)
parses a string into a Json array that must conform the spec of the parser.Methods in jsonvalues.spec with parameters of type JsArray Modifier and Type Method Description default Set<JsErrorPair>
JsArraySpec. test(JsArray value)
Set<JsErrorPair>
JsTupleSpec. test(JsArray array)
Method parameters in jsonvalues.spec with type arguments of type JsArray Modifier and Type Method Description static JsArraySpec
JsSpecs. arrayOfBoolSuchThat(Predicate<JsArray> predicate)
non-nullable array of booleans that satisfies the given predicatestatic JsArraySpec
JsSpecs. arrayOfDecSuchThat(Predicate<JsArray> predicate)
non-nullable array of decimal numbers that satisfies the given predicatestatic JsArraySpec
JsSpecs. arrayOfIntegralSuchThat(Predicate<JsArray> predicate)
non-nullable array of integral numbers that satisfies the given predicatestatic JsArraySpec
JsSpecs. arrayOfIntSuchThat(Predicate<JsArray> predicate)
non-nullable array of numbers that satisfies the given predicatestatic JsArraySpec
JsSpecs. arrayOfLongSuchThat(Predicate<JsArray> predicate)
non-nullable array of long numbers that satisfies the given predicatestatic JsArraySpec
JsSpecs. arrayOfNumberSuchThat(Predicate<JsArray> predicate)
non-nullable array of numbers that satisfies the given predicatestatic JsArraySpec
JsSpecs. arrayOfObjSuchThat(Predicate<JsArray> predicate)
non-nullable array of objects that satisfies the given predicatestatic JsArraySpec
JsSpecs. arrayOfStrSuchThat(Predicate<JsArray> predicate)
non-nullable array of strings that satisfies the given predicatestatic JsArraySpec
JsSpecs. arraySuchThat(Predicate<JsArray> predicate)
non-nullable array that satisfies the given predicate
-