final class JSONPathSegmentIndex extends JSONPathSegment
JSONPathSegment.AllSegment, JSONPathSegment.CycleNameSegment, JSONPathSegment.EntrySetSegment, JSONPathSegment.EvalSegment, JSONPathSegment.KeysSegment, JSONPathSegment.LengthSegment, JSONPathSegment.MaxSegment, JSONPathSegment.MinSegment, JSONPathSegment.MultiIndexSegment, JSONPathSegment.MultiNameSegment, JSONPathSegment.RandomIndexSegment, JSONPathSegment.RangeIndexSegment, JSONPathSegment.RootSegment, JSONPathSegment.SelfSegment, JSONPathSegment.SumSegment, JSONPathSegment.ValuesSegment| Modifier and Type | Field and Description |
|---|---|
(package private) int |
index |
(package private) static JSONPathSegmentIndex |
LAST |
(package private) static JSONPathSegmentIndex |
ONE |
(package private) static JSONPathSegmentIndex |
TWO |
(package private) static JSONPathSegmentIndex |
ZERO |
| Constructor and Description |
|---|
JSONPathSegmentIndex(int index) |
| Modifier and Type | Method and Description |
|---|---|
void |
accept(JSONReader jsonReader,
JSONPath.Context context) |
void |
eval(JSONPath.Context context) |
private java.lang.Object |
eval(java.util.Map object) |
(package private) static JSONPathSegmentIndex |
of(int index) |
boolean |
remove(JSONPath.Context context) |
void |
set(JSONPath.Context context,
java.lang.Object value) |
void |
setCallback(JSONPath.Context context,
java.util.function.BiFunction callback) |
void |
setInt(JSONPath.Context context,
int value) |
void |
setLong(JSONPath.Context context,
long value) |
java.lang.String |
toString() |
containsstatic final JSONPathSegmentIndex ZERO
static final JSONPathSegmentIndex ONE
static final JSONPathSegmentIndex TWO
static final JSONPathSegmentIndex LAST
final int index
static JSONPathSegmentIndex of(int index)
public void eval(JSONPath.Context context)
eval in class JSONPathSegmentprivate java.lang.Object eval(java.util.Map object)
public void set(JSONPath.Context context, java.lang.Object value)
set in class JSONPathSegmentpublic void setCallback(JSONPath.Context context, java.util.function.BiFunction callback)
setCallback in class JSONPathSegmentpublic boolean remove(JSONPath.Context context)
remove in class JSONPathSegmentpublic void setInt(JSONPath.Context context, int value)
setInt in class JSONPathSegmentpublic void setLong(JSONPath.Context context, long value)
setLong in class JSONPathSegmentpublic void accept(JSONReader jsonReader, JSONPath.Context context)
accept in class JSONPathSegmentpublic java.lang.String toString()
toString in class java.lang.Object