Uses of Class
jsonvalues.JsArray
Packages that use JsArray
Package
Description
The `jsonvalues` package provides a set of classes and interfaces for working with JSON (JavaScript Object Notation)
data in a type-safe and structured manner.
This package contains a set of generators for creating JSON-like data structures using the `jsonvalues` library.
The `jsonvalues.spec` package provides classes and interfaces for defining and working with JSON specifications
(specs) and parsers.
-
Uses of JsArray in jsonvalues
Fields in jsonvalues with type parameters of type JsArrayMethods in jsonvalues that return JsArrayModifier and TypeMethodDescriptionAppends one or moreJsValue
elements to the end of this JSON array.Appends all elements from anotherJsArray
to the end of this JSON array.JsArray.delete
(int index) Deletes the element at the specified index from thisJsArray
.static JsArray
JsArray.empty()
Returns the singleton empty JSON arrayJsArray.filterKeys
(BiPredicate<? super JsPath, ? super JsValue> filter) JsArray.filterKeys
(Predicate<? super String> filter) JsArray.filterObjs
(BiPredicate<? super JsPath, ? super JsObj> filter) JsArray.filterObjs
(Predicate<? super JsObj> filter) JsArray.filterValues
(BiPredicate<? super JsPath, ? super JsPrimitive> filter) JsArray.filterValues
(Predicate<? super JsPrimitive> filter) JsArray.getArray
(int index) Retrieves the value located at the specified index within the JSON-like array and attempts to interpret it as a JSON array (JsArray).Retrieves the value located at the specified index within the JSON-like array and attempts to interpret it as a JSON array (JsArray).Returns the array located at the given key or null if it doesn't exist, or it's not an array.Returns the array located at the given key or the default value provided if it doesn't exist, or it's not an array.default JsArray
Returns the array located at the given path or null if it doesn't exist, or it's not an array.default JsArray
Returns the array located at the given path or the default value provided if it doesn't exist, or it's not an array.JsArray.init()
Returns all the elements of this array except the last one.JsArray.intersection
(JsArray that, JsArray.TYPE ARRAY_AS) this.union(that, SET)
returnsthis
plus those elements fromthat
that don't exist inthis
.JsArray.mapKeys
(BiFunction<? super JsPath, ? super JsValue, String> fn) JsArray.mapObjs
(BiFunction<? super JsPath, ? super JsObj, ? extends JsValue> fn) JsArray.mapValues
(BiFunction<? super JsPath, ? super JsPrimitive, ? extends JsValue> fn) JsArray.mapValues
(Function<? super JsPrimitive, ? extends JsValue> fn) static JsArray
JsArray.of
(boolean bool, boolean... others) Creates a newJsArray
containing the specified boolean elements.static JsArray
JsArray.of
(double number, double... others) Creates a newJsArray
containing the specifieddouble
elements.static JsArray
JsArray.of
(int number, int... others) Creates a newJsArray
containing the specified integer elements.static JsArray
JsArray.of
(long number, long... others) Creates a newJsArray
containing the specified long elements.static JsArray
Creates a newJsArray
containing the specified string elements.static JsArray
JsArray.of
(BigDecimal elem, BigDecimal... others) Creates a newJsArray
from an array ofBigDecimal
elements.static JsArray
JsArray.of
(BigInteger number, BigInteger... others) Creates a newJsArray
containing the specifiedBigInteger
elements.static JsArray
static JsArray
Creates a newJsArray
containing the specified elements.static JsArray
JsArray.ofBools
(Collection<Boolean> list) static JsArray
JsArray.ofDecs
(Collection<BigDecimal> list) static JsArray
JsArray.ofDoubles
(Collection<Double> list) static JsArray
JsArray.ofInstants
(List<Instant> list) static JsArray
JsArray.ofInts
(Collection<Integer> list) static JsArray
JsArray.ofIterable
(Iterable<? extends JsValue> iterable) static JsArray
JsArray.ofLongs
(Collection<Long> list) static JsArray
JsArray.ofStrs
(Collection<String> list) static JsArray
JsArray.parse
(byte[] bytes) Parses a JSON array represented as a byte array and returns a newJsArray
instance.static JsArray
Parses a JSON array represented as a string and returns a newJsArray
instance.Adds one or more elements, starting from the last, to the front of this array.JsArray.prependAll
(JsArray array) Adds all the elements of theJsArray
, starting from the last, to the front of this array.Sets the value at the specified index within the JSON-like array to the provided JsValue using a default null value for padding.Sets the value at the specified index within the JSON-like array to the provided JsValue.JsArray.tail()
Returns a JSON array consisting of all elements of this array except the first one.default JsArray
JsValue.toJsArray()
Returns this JsValue as a JsArray.JsArray.union
(JsArray that, JsArray.TYPE ARRAY_AS) Methods in jsonvalues that return types with arguments of type JsArrayModifier and TypeMethodDescriptionJsOptics.JsArrayLenses.array
(int index) lens that focus on the json array located at an index in an arrayJsOptics.JsArrayLenses.array
(int index) lens that focus on the json array located at an index in an arraylens that focus on the json array located at a path in an arraylens that focus on the json array located at a path in an arrayJsOptics.JsArrayOptionals.array
(int index) optional that focus on the json array located at an index in an arrayJsOptics.JsArrayOptionals.array
(int index) optional that focus on the json array located at an index in an arrayoptional that focus on the array located at a path in an arrayoptional that focus on the array located at a path in an arraylens that focus on a json array located at a key in an object.lens that focus on a json object located at a path in an object.optional that focus on the array located at a key in an objectoptional that focus on the array located at a path in an objectfun.optic.Lens
<JsArray, byte[]> JsOptics.JsArrayLenses.binary
(int index) lens that focus on an array of bytes located at an index in an arrayfun.optic.Lens
<JsArray, byte[]> lens that focus on an array of bytes located at a path in an arrayJsOptics.JsArrayLenses.bool
(int index) lens that focus on the boolean located at an index in an arraylens that focus on the boolean located at a path in an arrayJsOptics.JsArrayOptionals.bool
(int index) optional that focus on the boolean located at an index in an arrayoptional that focus on the boolean located at a path in an arrayfun.optic.Lens
<JsArray, BigDecimal> JsOptics.JsArrayLenses.decimalNum
(int index) lens that focus on the decimal number located at an index in an arrayfun.optic.Lens
<JsArray, BigDecimal> JsOptics.JsArrayLenses.decimalNum
(JsPath path) lens that focus on the decimal number located at a path in an arrayfun.optic.Option
<JsArray, BigDecimal> JsOptics.JsArrayOptionals.decimalNum
(int index) optional that focus on the decimal number located at an index in an arrayfun.optic.Option
<JsArray, BigDecimal> JsOptics.JsArrayOptionals.decimalNum
(JsPath path) optional that focus on the decimal number located at a path in an arrayJsOptics.JsArrayLenses.doubleNum
(int index) lens that focus on the double number located at an index in an arraylens that focus on the double number located at a path in an arrayJsOptics.JsArrayOptionals.doubleNum
(int index) optional that focus on the double number located at an index in an arrayoptional that focus on the double number located at a path in an arrayJsOptics.JsArrayLenses.instant
(int index) lens that focus on the array of bytes at an index in an arraylens that focus on the array of bytes located at a path in an arrayJsOptics.JsArrayOptionals.instant
(int index) optional that focus on the instant located at an index in an arrayoptional that focus on the instant located at a path in an arrayfun.optic.Lens
<JsArray, BigInteger> JsOptics.JsArrayLenses.integralNum
(int index) lens that focus on the integral number located at an index in an arrayfun.optic.Lens
<JsArray, BigInteger> JsOptics.JsArrayLenses.integralNum
(JsPath path) lens that focus on the integral number located at a path in an arrayfun.optic.Option
<JsArray, BigInteger> JsOptics.JsArrayOptionals.integralNum
(int index) optional that focus on the integral number located at an index in an arrayfun.optic.Option
<JsArray, BigInteger> JsOptics.JsArrayOptionals.integralNum
(JsPath path) optional that focus on the integral number located at a path in an arrayJsOptics.JsArrayLenses.intNum
(int index) lens that focus on the integer number located at an index in an arraylens that focus on the integer number located at a path in an arrayJsOptics.JsArrayOptionals.intNum
(int index) optional that focus on the integer number located at an index in an arrayoptional that focus on the integer number located at a path in an arrayJsOptics.JsArrayLenses.longNum
(int index) lens that focus on the long number located at an index in an arraylens that focus on the long number located at a path in an arrayJsOptics.JsArrayOptionals.longNum
(int index) optional that focus on the long number located at an index in an arrayoptional that focus on the long number located at a path in an arrayJsOptics.JsArrayLenses.obj
(int index) lens that focus on the json object located at an index in an arraylens that focus on the JSON object located at a path in an arrayJsOptics.JsArrayOptionals.obj
(int index) optional that focus on the json object located at an index in an arrayoptional that focus on the object located at a path in an arrayJsOptics.JsArrayLenses.str
(int index) lens that focus on the string located at an index in an arraylens that focus on the string located at a path in an arrayJsOptics.JsArrayOptionals.str
(int index) optional that focus on the string located at an index in an arrayoptional that focus on the string located at a path in an arrayJsOptics.JsArrayLenses.value
(int index) lens that focus on the value located at an index in an arraylens that focus on the value located at a path in an arrayMethods in jsonvalues with parameters of type JsArrayModifier and TypeMethodDescriptionAppends all elements from anotherJsArray
to the end of this JSON array.boolean
JsArray.equals
(JsArray array, JsArray.TYPE ARRAY_AS) Checks if this JSON array is equal to another JSON array.JsArray.intersection
(JsArray that, JsArray.TYPE ARRAY_AS) this.union(that, SET)
returnsthis
plus those elements fromthat
that don't exist inthis
.JsArray.prependAll
(JsArray array) Adds all the elements of theJsArray
, starting from the last, to the front of this array.JsArray.union
(JsArray that, JsArray.TYPE ARRAY_AS) Method parameters in jsonvalues with type arguments of type JsArrayModifier and TypeMethodDescriptionRetrieves the value located at the specified index within the JSON-like array and attempts to interpret it as a JSON array (JsArray).Returns the array located at the given key or the default value provided if it doesn't exist, or it's not an array.default JsArray
Returns the array located at the given path or the default value provided if it doesn't exist, or it's not an array.default boolean
Returns true if this element is a JsArray and satisfies the given predicate. -
Uses of JsArray in jsonvalues.gen
Methods in jsonvalues.gen that return types with arguments of type JsArrayModifier and TypeMethodDescriptionJsArrayGen.apply
(RandomGenerator seed) JsTupleGen.apply
(RandomGenerator seed) static fun.gen.Gen
<JsArray> Returns an array generator.static fun.gen.Gen
<JsArray> Returns a biased array generator.static fun.gen.Gen
<JsArray> Returns a tuple generator.static fun.gen.Gen
<JsArray> static fun.gen.Gen
<JsArray> Returns a fixed-size array generator. -
Uses of JsArray in jsonvalues.spec
Methods in jsonvalues.spec that return JsArrayModifier and TypeMethodDescriptionJsArraySpecParser.parse
(byte[] bytes) Parses an array of bytes representing JSON array data into a structured JSON array.JsArraySpecParser.parse
(InputStream inputstream) Parses JSON array data from an input stream into a structured JSON array.Parses a JSON array string into a structured JSON array.JsIO.parseToJsArray
(byte[] bytes) Parses the given array of bytes into an immutable and persistent JSON array.Methods in jsonvalues.spec with parameters of type JsArrayModifier and TypeMethodDescriptionBuilds and returns aJsEnum
specification with the specified symbols.Method parameters in jsonvalues.spec with type arguments of type JsArrayModifier and TypeMethodDescriptionstatic JsArraySpec
JsSpecs.arrayOfBigIntSuchThat
(Predicate<JsArray> predicate) Returns a specification for a non-nullable array of integral numbers, where each element of the array satisfies the given predicate.static JsArraySpec
JsSpecs.arrayOfBoolSuchThat
(Predicate<JsArray> predicate) Returns a specification for a non-nullable array of booleans that satisfies the given predicate.static JsArraySpec
JsSpecs.arrayOfDecSuchThat
(Predicate<JsArray> predicate) Returns a specification for a non-nullable array of decimal numbers, where each element of the array satisfies the given predicate.static JsArraySpec
JsSpecs.arrayOfDoubleSuchThat
(Predicate<JsArray> predicate) Returns a specification for a non-nullable array of double that satisfies the given predicate.static JsArraySpec
JsSpecs.arrayOfIntSuchThat
(Predicate<JsArray> predicate) Returns a specification for a non-nullable array of integer numbers, where each element of the array satisfies the given predicate.static JsArraySpec
JsSpecs.arrayOfLongSuchThat
(Predicate<JsArray> predicate) Returns a specification for a non-nullable array of long numbers that satisfies the given predicate.static JsArraySpec
JsSpecs.arrayOfObjSuchThat
(Predicate<JsArray> predicate) Returns a specification for a non-nullable array of objects that satisfies the given predicate.static JsArraySpec
JsSpecs.arrayOfStrSuchThat
(Predicate<JsArray> predicate) Returns a specification for a non-nullable array of strings that satisfies the given predicate.static JsArraySpec
JsSpecs.arraySuchThat
(Predicate<JsArray> predicate) Returns a specification for a non-nullable array that satisfies the given predicate.