|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.github.fge.jackson.jsonpointer.ReferenceToken
@Immutable public final class ReferenceToken
One JSON Pointer reference token
This class represents one reference token. It has no publicly available constructor; instead, it has static factory methods used to generate tokens depending on whether the input is a decoded (raw) token or an encoded (cooked) one, or even an integer.
The only characters to encode in a raw token are / (which becomes
~1) and ~ (which becomes ~0).
Note that a reference token may be empty (empty object member names are legal!).
| Method Summary | |
|---|---|
boolean |
equals(Object obj)
|
static ReferenceToken |
fromCooked(String cooked)
Generate a reference token from an encoded (cooked) representation |
static ReferenceToken |
fromInt(int index)
Generate a reference token from an integer |
static ReferenceToken |
fromRaw(String raw)
Generate a reference token from a decoded (raw) representation |
String |
getRaw()
Get the raw representation of that token as a string |
int |
hashCode()
|
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Method Detail |
|---|
public static ReferenceToken fromCooked(String cooked)
throws JsonPointerException
cooked - the input
JsonPointerException - illegal token (bad encode sequence)
NullPointerException - null inputpublic static ReferenceToken fromRaw(String raw)
raw - the input
NullPointerException - null inputpublic static ReferenceToken fromInt(int index)
index - the integer
public String getRaw()
public int hashCode()
hashCode in class Objectpublic boolean equals(Object obj)
equals in class Objectpublic String toString()
toString in class Object
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||