Package jsonvalues
Class JsOptics.JsObjLenses
- java.lang.Object
-
- jsonvalues.JsOptics.JsObjLenses
-
- Enclosing class:
- JsOptics
public static class JsOptics.JsObjLenses extends java.lang.Object
represents all the lenses defined for a Json object
-
-
Constructor Summary
Constructors Constructor Description JsObjLenses()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Lens<JsObj,JsArray>
array(java.lang.String key)
lens that focus on a json array located at a key in an object.Lens<JsObj,JsArray>
array(JsPath path)
lens that focus on a json object located at a path in an object.Lens<JsObj,byte[]>
binary(java.lang.String key)
lens that focus on an array of bytes located at a key in an object.Lens<JsObj,byte[]>
binary(JsPath path)
lens that focus on an array of bytes located at a path in an object.Lens<JsObj,java.lang.Boolean>
bool(java.lang.String key)
lens that focus on a boolean located at a path in an object.Lens<JsObj,java.lang.Boolean>
bool(JsPath path)
lens that focus on a boolean located at a path in an object.Lens<JsObj,java.math.BigDecimal>
decimalNum(java.lang.String key)
lens that focus on a decimal number located at a key in an object.Lens<JsObj,java.math.BigDecimal>
decimalNum(JsPath path)
lens that focus on a decimal number located at a path in an object.Lens<JsObj,java.lang.Double>
doubleNum(java.lang.String key)
lens that focus on a double number located at a key in an object.Lens<JsObj,java.lang.Double>
doubleNum(JsPath path)
lens that focus on a double number located at a path in an object.Lens<JsObj,java.time.Instant>
instant(java.lang.String key)
lens that focus on an instant located at a key in an object.Lens<JsObj,java.time.Instant>
instant(JsPath path)
lens that focus on an instant located at a path in an object.Lens<JsObj,java.math.BigInteger>
integralNum(java.lang.String key)
lens that focus on a integral number located at a key in an object.Lens<JsObj,java.math.BigInteger>
integralNum(JsPath path)
lens that focus on a integral number located at a path in an object.Lens<JsObj,java.lang.Integer>
intNum(java.lang.String key)
lens that focus on a integer number located at a key in an object.Lens<JsObj,java.lang.Integer>
intNum(JsPath path)
lens that focus on a integer number located at a path in an object.Lens<JsObj,java.lang.Long>
longNum(java.lang.String key)
lens that focus on a long number located at a key in an object.Lens<JsObj,java.lang.Long>
longNum(JsPath path)
lens that focus on a long number located at a path in an object.Lens<JsObj,JsObj>
obj(java.lang.String key)
lens that focus on a json object located at a key in an object.Lens<JsObj,JsObj>
obj(JsPath path)
lens that focus on a json object located at a path in an object.Lens<JsObj,java.lang.String>
str(java.lang.String key)
lens that focus on a string located at a key in an object.Lens<JsObj,java.lang.String>
str(JsPath path)
lens that focus on a string located at a path in an object.Lens<JsObj,JsValue>
value(java.lang.String key)
lens that focus on a value located at a key in an object.Lens<JsObj,JsValue>
value(JsPath path)
lens that focus on a value located at a path in an object.
-
-
-
Method Detail
-
value
public Lens<JsObj,JsValue> value(JsPath path)
lens that focus on a value located at a path in an object.- Parameters:
path
- the path where the value is located at- Returns:
- an optional
-
value
public Lens<JsObj,JsValue> value(java.lang.String key)
lens that focus on a value located at a key in an object.- Parameters:
key
- the key where the value is located at- Returns:
- an optional
-
str
public Lens<JsObj,java.lang.String> str(JsPath path)
lens that focus on a string located at a path in an object.- Parameters:
path
- the path where the string is located at- Returns:
- an optional
-
str
public Lens<JsObj,java.lang.String> str(java.lang.String key)
lens that focus on a string located at a key in an object.- Parameters:
key
- the key where the string is located at- Returns:
- an optional
-
bool
public Lens<JsObj,java.lang.Boolean> bool(JsPath path)
lens that focus on a boolean located at a path in an object.- Parameters:
path
- the path where the boolean is located at- Returns:
- an optional
-
bool
public Lens<JsObj,java.lang.Boolean> bool(java.lang.String key)
lens that focus on a boolean located at a path in an object.- Parameters:
key
- the key where the boolean is located at- Returns:
- an optional
-
longNum
public Lens<JsObj,java.lang.Long> longNum(JsPath path)
lens that focus on a long number located at a path in an object.- Parameters:
path
- the path where the long number is located at- Returns:
- an optional
-
longNum
public Lens<JsObj,java.lang.Long> longNum(java.lang.String key)
lens that focus on a long number located at a key in an object.- Parameters:
key
- the key where the long number is located at- Returns:
- an optional
-
intNum
public Lens<JsObj,java.lang.Integer> intNum(JsPath path)
lens that focus on a integer number located at a path in an object.- Parameters:
path
- the path where the integer number is located at- Returns:
- an optional
-
intNum
public Lens<JsObj,java.lang.Integer> intNum(java.lang.String key)
lens that focus on a integer number located at a key in an object.- Parameters:
key
- the key where the integer number is located at- Returns:
- an optional
-
doubleNum
public Lens<JsObj,java.lang.Double> doubleNum(JsPath path)
lens that focus on a double number located at a path in an object.- Parameters:
path
- the path where the double number is located at- Returns:
- an optional
-
doubleNum
public Lens<JsObj,java.lang.Double> doubleNum(java.lang.String key)
lens that focus on a double number located at a key in an object.- Parameters:
key
- the key where the double number is located at- Returns:
- an optional
-
decimalNum
public Lens<JsObj,java.math.BigDecimal> decimalNum(JsPath path)
lens that focus on a decimal number located at a path in an object.- Parameters:
path
- the path where the decimal number is located at- Returns:
- an optional
-
decimalNum
public Lens<JsObj,java.math.BigDecimal> decimalNum(java.lang.String key)
lens that focus on a decimal number located at a key in an object.- Parameters:
key
- the key where the decimal number is located at- Returns:
- an optional
-
integralNum
public Lens<JsObj,java.math.BigInteger> integralNum(JsPath path)
lens that focus on a integral number located at a path in an object.- Parameters:
path
- the path where the integral number is located at- Returns:
- an optional
-
integralNum
public Lens<JsObj,java.math.BigInteger> integralNum(java.lang.String key)
lens that focus on a integral number located at a key in an object.- Parameters:
key
- the key where the integral number is located at- Returns:
- an optional
-
obj
public Lens<JsObj,JsObj> obj(JsPath path)
lens that focus on a json object located at a path in an object.- Parameters:
path
- the path where the json object is located at- Returns:
- an optional
-
obj
public Lens<JsObj,JsObj> obj(java.lang.String key)
lens that focus on a json object located at a key in an object.- Parameters:
key
- the key where the json object is located at- Returns:
- an optional
-
array
public Lens<JsObj,JsArray> array(JsPath path)
lens that focus on a json object located at a path in an object.- Parameters:
path
- the path where the json array is located at- Returns:
- an optional
-
array
public Lens<JsObj,JsArray> array(java.lang.String key)
lens that focus on a json array located at a key in an object.- Parameters:
key
- the key where the json array is located at- Returns:
- an optional
-
binary
public Lens<JsObj,byte[]> binary(JsPath path)
lens that focus on an array of bytes located at a path in an object.- Parameters:
path
- the path where the array of bytes is located at- Returns:
- an optional
-
binary
public Lens<JsObj,byte[]> binary(java.lang.String key)
lens that focus on an array of bytes located at a key in an object.- Parameters:
key
- the key where the array of bytes is located at- Returns:
- an optional
-
instant
public Lens<JsObj,java.time.Instant> instant(JsPath path)
lens that focus on an instant located at a path in an object.- Parameters:
path
- the path where the instant is located at- Returns:
- an optional
-
-