Package | Description |
---|---|
com.dslplatform.json | |
jsonvalues | |
jsonvalues.gen | |
jsonvalues.spec |
Modifier and Type | Method and Description |
---|---|
JsArray |
MyDslJson.deserializeToJsArray(byte[] bytes,
JsSpecParser parser) |
JsArray |
MyDslJson.deserializeToJsArray(InputStream is,
JsSpecParser parser) |
Modifier and Type | Field and Description |
---|---|
static JsArray |
JsArray.EMPTY |
Modifier and Type | Field and Description |
---|---|
static fun.optic.Prism<JsValue,JsArray> |
JsArray.prism
prism between the sum type JsValue and JsArray
|
Modifier and Type | Method and Description |
---|---|
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.delete(int index) |
JsArray |
JsArray.delete(JsPath path) |
static JsArray |
JsArray.empty() |
JsArray |
JsArray.filterKeys(BiPredicate<? super JsPath,? super JsValue> filter) |
JsArray |
JsArray.filterKeys(Predicate<? super String> filter) |
JsArray |
JsArray.filterObjs(BiPredicate<? super JsPath,? super JsObj> filter) |
JsArray |
JsArray.filterObjs(Predicate<? super JsObj> filter) |
JsArray |
JsArray.filterValues(BiPredicate<? super JsPath,? super JsPrimitive> filter) |
JsArray |
JsArray.filterValues(Predicate<? super JsPrimitive> filter) |
JsArray |
JsArray.getArray(int index)
Returns the array located at the given index or null if it doesn't exist or it's not a json array.
|
JsArray |
JsArray.getArray(int index,
Supplier<JsArray> orElse)
Returns the array located at the given index or the default value provided if it doesn't exist
or it's not a json 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.
|
default JsArray |
Json.getArray(JsPath path,
Supplier<JsArray> orElse)
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 |
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.
|
JsArray |
JsObj.getArray(String key,
Supplier<JsArray> orElse)
Returns the array located at the given key or the default value provided 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.union(that, SET) returns this plus those elements from that that
don't exist in this . |
JsArray |
JsArray.mapKeys(BiFunction<? super JsPath,? super JsValue,String> fn) |
JsArray |
JsArray.mapKeys(Function<? super String,String> fn) |
JsArray |
JsArray.mapObjs(BiFunction<? super JsPath,? super JsObj,? extends JsValue> fn) |
JsArray |
JsArray.mapObjs(Function<? super JsObj,? extends JsValue> fn) |
JsArray |
JsArray.mapValues(BiFunction<? super JsPath,? super JsPrimitive,? extends JsValue> fn) |
JsArray |
JsArray.mapValues(Function<? super JsPrimitive,? extends JsValue> fn) |
static JsArray |
JsArray.of(BigInteger number,
BigInteger... others)
Returns an immutable array from one or more big integers.
|
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(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.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.ofIterable(Iterable<? extends JsValue> iterable)
returns an immutable json array from an iterable of json elements
|
static JsArray |
JsArray.parse(String str)
Tries to parse the string into an immutable json array.
|
static JsArray |
JsArray.parseYaml(String str)
Tries to parse the YAML string into an immutable json array.
|
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.set(int index,
JsValue element) |
JsArray |
JsArray.set(int index,
JsValue value,
JsValue padElement) |
JsArray |
JsArray.set(JsPath path,
JsValue element) |
JsArray |
JsArray.set(JsPath path,
JsValue value,
JsValue padElement) |
JsArray |
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 |
JsArray.union(JsArray that,
JsArray.TYPE ARRAY_AS)
returns
this plus those elements from that which position is >= this.size() ,
and, at the positions where a container of the same type exists in both this and that ,
the result is their union. |
Modifier and Type | Method and Description |
---|---|
fun.optic.Lens<JsArray,JsArray> |
JsOptics.JsArrayLenses.array(int index)
lens that focus on the json array located at an index in an array
|
fun.optic.Lens<JsArray,JsArray> |
JsOptics.JsArrayLenses.array(int index)
lens that focus on the json array located at an index in an array
|
fun.optic.Option<JsArray,JsArray> |
JsOptics.JsArrayOptionals.array(int index)
optional that focus on the json array located at an index in an array
|
fun.optic.Option<JsArray,JsArray> |
JsOptics.JsArrayOptionals.array(int index)
optional that focus on the json array located at an index in an array
|
fun.optic.Lens<JsArray,JsArray> |
JsOptics.JsArrayLenses.array(JsPath path)
lens that focus on the json array located at a path in an array
|
fun.optic.Lens<JsArray,JsArray> |
JsOptics.JsArrayLenses.array(JsPath path)
lens that focus on the json array located at a path in an array
|
fun.optic.Option<JsArray,JsArray> |
JsOptics.JsArrayOptionals.array(JsPath path)
optional that focus on the array located at a path in an array
|
fun.optic.Option<JsArray,JsArray> |
JsOptics.JsArrayOptionals.array(JsPath path)
optional that focus on the array located at a path in an array
|
fun.optic.Option<JsObj,JsArray> |
JsOptics.JsObjOptional.array(JsPath path)
optional that focus on the array located at a path in an object
|
fun.optic.Lens<JsObj,JsArray> |
JsOptics.JsObjLenses.array(JsPath path)
lens that focus on a json object located at a path in an object.
|
fun.optic.Option<JsObj,JsArray> |
JsOptics.JsObjOptional.array(String key)
optional that focus on the array located at a key in an object
|
fun.optic.Lens<JsObj,JsArray> |
JsOptics.JsObjLenses.array(String key)
lens that focus on a json array located at a key in an object.
|
fun.optic.Lens<JsArray,byte[]> |
JsOptics.JsArrayLenses.binary(int index)
lens that focus on an array of bytes located at an index in an array
|
fun.optic.Lens<JsArray,byte[]> |
JsOptics.JsArrayLenses.binary(JsPath path)
lens that focus on an array of bytes located at a path in an array
|
fun.optic.Lens<JsArray,Boolean> |
JsOptics.JsArrayLenses.bool(int index)
lens that focus on the boolean located at an index in an array
|
fun.optic.Option<JsArray,Boolean> |
JsOptics.JsArrayOptionals.bool(int index)
optional that focus on the boolean located at an index in an array
|
fun.optic.Lens<JsArray,Boolean> |
JsOptics.JsArrayLenses.bool(JsPath path)
lens that focus on the boolean located at a path in an array
|
fun.optic.Option<JsArray,Boolean> |
JsOptics.JsArrayOptionals.bool(JsPath path)
optional that focus on the boolean located at a path in an array
|
fun.optic.Lens<JsArray,BigDecimal> |
JsOptics.JsArrayLenses.decimalNum(int index)
lens that focus on the decimal number located at an index in an array
|
fun.optic.Option<JsArray,BigDecimal> |
JsOptics.JsArrayOptionals.decimalNum(int index)
optional that focus on the decimal number located at an index in an array
|
fun.optic.Lens<JsArray,BigDecimal> |
JsOptics.JsArrayLenses.decimalNum(JsPath path)
lens that focus on the decimal number located at a path in an array
|
fun.optic.Option<JsArray,BigDecimal> |
JsOptics.JsArrayOptionals.decimalNum(JsPath path)
optional that focus on the decimal number located at a path in an array
|
fun.optic.Lens<JsArray,Double> |
JsOptics.JsArrayLenses.doubleNum(int index)
lens that focus on the double number located at an index in an array
|
fun.optic.Option<JsArray,Double> |
JsOptics.JsArrayOptionals.doubleNum(int index)
optional that focus on the double number located at an index in an array
|
fun.optic.Lens<JsArray,Double> |
JsOptics.JsArrayLenses.doubleNum(JsPath path)
lens that focus on the double number located at a path in an array
|
fun.optic.Option<JsArray,Double> |
JsOptics.JsArrayOptionals.doubleNum(JsPath path)
optional that focus on the double number located at a path in an array
|
fun.optic.Lens<JsArray,Instant> |
JsOptics.JsArrayLenses.instant(int index)
lens that focus on the array of bytes at an index in an array
|
fun.optic.Option<JsArray,Instant> |
JsOptics.JsArrayOptionals.instant(int index)
optional that focus on the instant located at an index in an array
|
fun.optic.Lens<JsArray,Instant> |
JsOptics.JsArrayLenses.instant(JsPath path)
lens that focus on the array of bytes located at a path in an array
|
fun.optic.Option<JsArray,Instant> |
JsOptics.JsArrayOptionals.instant(JsPath path)
optional that focus on the instant located at a path in an array
|
fun.optic.Lens<JsArray,BigInteger> |
JsOptics.JsArrayLenses.integralNum(int index)
lens that focus on the integral number located at an index in an array
|
fun.optic.Option<JsArray,BigInteger> |
JsOptics.JsArrayOptionals.integralNum(int index)
optional that focus on the integral number located at an index in an array
|
fun.optic.Lens<JsArray,BigInteger> |
JsOptics.JsArrayLenses.integralNum(JsPath path)
lens that focus on the integral number located at a path in an array
|
fun.optic.Option<JsArray,BigInteger> |
JsOptics.JsArrayOptionals.integralNum(JsPath path)
optional that focus on the integral number located at a path in an array
|
fun.optic.Lens<JsArray,Integer> |
JsOptics.JsArrayLenses.intNum(int index)
lens that focus on the integer number located at an index in an array
|
fun.optic.Option<JsArray,Integer> |
JsOptics.JsArrayOptionals.intNum(int index)
optional that focus on the integer number located at an index in an array
|
fun.optic.Lens<JsArray,Integer> |
JsOptics.JsArrayLenses.intNum(JsPath path)
lens that focus on the integer number located at a path in an array
|
fun.optic.Option<JsArray,Integer> |
JsOptics.JsArrayOptionals.intNum(JsPath path)
optional that focus on the integer number located at a path in an array
|
fun.optic.Lens<JsArray,Long> |
JsOptics.JsArrayLenses.longNum(int index)
lens that focus on the long number located at an index in an array
|
fun.optic.Option<JsArray,Long> |
JsOptics.JsArrayOptionals.longNum(int index)
optional that focus on the long number located at an index in an array
|
fun.optic.Lens<JsArray,Long> |
JsOptics.JsArrayLenses.longNum(JsPath path)
lens that focus on the long number located at a path in an array
|
fun.optic.Option<JsArray,Long> |
JsOptics.JsArrayOptionals.longNum(JsPath path)
optional that focus on the long number located at a path in an array
|
fun.optic.Lens<JsArray,JsObj> |
JsOptics.JsArrayLenses.obj(int index)
lens that focus on the json object located at an index in an array
|
fun.optic.Option<JsArray,JsObj> |
JsOptics.JsArrayOptionals.obj(int index)
optional that focus on the json object located at an index in an array
|
fun.optic.Lens<JsArray,JsObj> |
JsOptics.JsArrayLenses.obj(JsPath path)
lens that focus on the json object located at a path in an array
|
fun.optic.Option<JsArray,JsObj> |
JsOptics.JsArrayOptionals.obj(JsPath path)
optional that focus on the object located at a path in an array
|
fun.optic.Lens<JsArray,String> |
JsOptics.JsArrayLenses.str(int index)
lens that focus on the string located at an index in an array
|
fun.optic.Option<JsArray,String> |
JsOptics.JsArrayOptionals.str(int index)
optional that focus on the string located at an index in an array
|
fun.optic.Lens<JsArray,String> |
JsOptics.JsArrayLenses.str(JsPath path)
lens that focus on the string located at a path in an array
|
fun.optic.Option<JsArray,String> |
JsOptics.JsArrayOptionals.str(JsPath path)
optional that focus on the string located at a path in an array
|
fun.optic.Lens<JsArray,JsValue> |
JsOptics.JsArrayLenses.value(int index)
lens that focus on the value located at an index in an array
|
fun.optic.Lens<JsArray,JsValue> |
JsOptics.JsArrayLenses.value(JsPath path)
lens that focus on the value located at a path in an array
|
Modifier and Type | Method and Description |
---|---|
JsArray |
JsArray.appendAll(JsArray array)
Adds all the elements of the given array, starting from the head, to the back of this array.
|
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.union(that, SET) returns this plus those elements from that that
don't exist in this . |
JsArray |
JsArray.prependAll(JsArray array)
Adds all the elements of the array, starting from the last, to the front of this array.
|
JsArray |
JsArray.union(JsArray that,
JsArray.TYPE ARRAY_AS)
returns
this plus those elements from that which position is >= this.size() ,
and, at the positions where a container of the same type exists in both this and that ,
the result is their union. |
Modifier and Type | Method and Description |
---|---|
JsArray |
JsArray.getArray(int index,
Supplier<JsArray> orElse)
Returns the array located at the given index or the default value provided if it doesn't exist
or it's not a json array.
|
default JsArray |
Json.getArray(JsPath path,
Supplier<JsArray> orElse)
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 |
JsObj.getArray(String key,
Supplier<JsArray> orElse)
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 boolean |
JsValue.isArray(Predicate<JsArray> predicate)
Returns true if this elem is a JsArray and satisfies the given predicate
|
Modifier and Type | Method and Description |
---|---|
Supplier<JsArray> |
JsTupleGen.apply(Random seed)
Returns a supplier from the specified seed that generates a new tuple, modeled with a JsArray,
each time it's called
|
Supplier<JsArray> |
JsArrayGen.apply(Random seed)
Returns a supplier from the specified seed that generates a new JsArray each time it's called
|
static fun.gen.Gen<JsArray> |
JsArrayGen.arbitrary(fun.gen.Gen<? extends JsValue> gen,
int size) |
static fun.gen.Gen<JsArray> |
JsArrayGen.arbitrary(fun.gen.Gen<? extends JsValue> gen,
int minSize,
int maxSize) |
static fun.gen.Gen<JsArray> |
JsArrayGen.biased(fun.gen.Gen<? extends JsValue> gen,
int minSize,
int maxSize) |
static fun.gen.Gen<JsArray> |
JsTupleGen.of(fun.gen.Gen<? extends JsValue> gen,
fun.gen.Gen<? extends JsValue>... others)
Returns a tuple generator.
|
Modifier and Type | Method and 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.
|
Modifier and Type | Method and Description |
---|---|
static JsArraySpec |
JsSpecs.arrayOfBigIntSuchThat(Predicate<JsArray> predicate)
non-nullable array of integral numbers that satisfies the given predicate
|
static JsArraySpec |
JsSpecs.arrayOfBoolSuchThat(Predicate<JsArray> predicate)
non-nullable array of booleans that satisfies the given predicate
|
static JsArraySpec |
JsSpecs.arrayOfDecSuchThat(Predicate<JsArray> predicate)
non-nullable array of decimal numbers that satisfies the given predicate
|
static JsArraySpec |
JsSpecs.arrayOfIntSuchThat(Predicate<JsArray> predicate)
non-nullable array of numbers that satisfies the given predicate
|
static JsArraySpec |
JsSpecs.arrayOfLongSuchThat(Predicate<JsArray> predicate)
non-nullable array of long numbers that satisfies the given predicate
|
static JsArraySpec |
JsSpecs.arrayOfNumberSuchThat(Predicate<JsArray> predicate)
non-nullable array of numbers that satisfies the given predicate
|
static JsArraySpec |
JsSpecs.arrayOfObjSuchThat(Predicate<JsArray> predicate)
non-nullable array of objects that satisfies the given predicate
|
static JsArraySpec |
JsSpecs.arrayOfStrSuchThat(Predicate<JsArray> predicate)
non-nullable array of strings that satisfies the given predicate
|
static JsArraySpec |
JsSpecs.arraySuchThat(Predicate<JsArray> predicate)
non-nullable array that satisfies the given predicate
|
Copyright © 2022. All rights reserved.