public final class JsPair extends Object
Modifier and Type | Field | Description |
---|---|---|
JsElem |
elem |
the json element.
|
JsPath |
path |
the location of the element.
|
Modifier and Type | Method | Description |
---|---|---|
boolean |
equals(@Nullable Object that) |
Returns true if that is a pair and both represents the same element at the same location.
|
int |
hashCode() |
Returns the hashcode of this pair.
|
JsPair |
mapElem(UnaryOperator<JsElem> map) |
Returns a new pair with the same path and a new element result of applying the mapping function
|
JsPair |
mapPath(UnaryOperator<JsPath> map) |
Returns a new pair with the same element and a new path result of applying the mapping function
|
static JsPair |
of(String path,
boolean b) |
Returns a json pair from the path-like string and the boolean.
|
static JsPair |
of(String path,
double d) |
Returns a json pair from the path-like string and the double.
|
static JsPair |
of(String path,
int i) |
Returns a json pair from the path-like string and the integer.
|
static JsPair |
of(String path,
long l) |
Returns a json pair from the path-like string and the long.
|
static JsPair |
of(String path,
String s) |
Returns a json pair from the path-like string and the string.
|
static JsPair |
of(String path,
BigDecimal bd) |
Returns a json pair from the path-like string and the big decimal.
|
static JsPair |
of(String path,
BigInteger bi) |
Returns a json pair from the path-like string and the big integer.
|
static JsPair |
of(String path,
JsElem elem) |
Returns a json pair from the path-like string and the json element.
|
static JsPair |
of(JsPath path,
boolean b) |
Returns a json pair from the path and the boolean.
|
static JsPair |
of(JsPath path,
double d) |
Returns a json pair from the path and the double.
|
static JsPair |
of(JsPath path,
int i) |
Returns a json pair from the path and the integer.
|
static JsPair |
of(JsPath path,
long l) |
Returns a json pair from the path and the long.
|
static JsPair |
of(JsPath path,
String s) |
Returns a json pair from the path and the string.
|
static JsPair |
of(JsPath path,
BigDecimal bd) |
Returns a json pair from the path and the big decimal.
|
static JsPair |
of(JsPath path,
BigInteger bi) |
Returns a json pair from the path and the big integer.
|
static JsPair |
of(JsPath path,
JsElem elem) |
Returns a json pair from the path and the json element.
|
String |
toString() |
public final JsElem elem
public final JsPath path
public static JsPair of(String path, JsElem elem)
path
- the path-like stringelem
- the JsElempublic static JsPair of(String path, int i)
path
- the path-like stringi
- the integerpublic static JsPair of(String path, double d)
path
- the path-like stringd
- the doublepublic static JsPair of(String path, long l)
path
- the path-like stringl
- the longpublic static JsPair of(String path, boolean b)
path
- the path-like stringb
- the booleanpublic static JsPair of(String path, String s)
path
- the path-like strings
- the stringpublic static JsPair of(String path, BigDecimal bd)
path
- the path-like stringbd
- the big decimalpublic static JsPair of(String path, BigInteger bi)
path
- the path-like stringbi
- the big integerpublic static JsPair of(JsPath path, JsElem elem)
path
- the JsPath objectelem
- the JsElempublic static JsPair of(JsPath path, int i)
path
- the JsPathi
- the integerpublic static JsPair of(JsPath path, double d)
path
- the JsPathd
- the doublepublic static JsPair of(JsPath path, long l)
path
- the JsPathl
- the longpublic static JsPair of(JsPath path, boolean b)
path
- the JsPathb
- the booleanpublic static JsPair of(JsPath path, String s)
path
- the JsPaths
- the stringpublic static JsPair of(JsPath path, BigDecimal bd)
path
- the JsPathbd
- the big decimalpublic static JsPair of(JsPath path, BigInteger bi)
path
- the JsPathbi
- the big integerpublic String toString()
public boolean equals(@Nullable Object that)
public int hashCode()
public JsPair mapElem(UnaryOperator<JsElem> map)
map
- the mapping function which maps the JsElempublic JsPair mapPath(UnaryOperator<JsPath> map)
map
- the mapping function which maps the JsPathCopyright © 2019. All rights reserved.