public class Reference extends Object implements Parcelable
Modifier and Type | Class and Description |
---|---|
static class |
Reference.Builder |
Parcelable.ClassLoaderCreator<T>, Parcelable.Creator<T>
Modifier and Type | Field and Description |
---|---|
static Parcelable.Creator<Reference> |
CREATOR |
protected JSONObject |
jsonObject |
protected String |
jsonString |
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE
Constructor and Description |
---|
Reference(JSONObject jsonObject) |
Reference(Long element) |
Reference(String json,
boolean ignore) |
Reference(String id,
String href,
Long element) |
Modifier and Type | Method and Description |
---|---|
int |
describeContents() |
Long |
getElement()
Reference Object
|
String |
getHref() |
String |
getId()
Unique identifier
|
JSONObject |
getJSONObject() |
boolean |
hasElement()
Checks whether the 'element' field has been set
|
boolean |
hasHref()
Checks whether the 'href' field has been set
|
boolean |
hasId()
Checks whether the 'id' field has been set
|
void |
setElement(Long element) |
void |
setHref(String href) |
void |
setId(String id) |
void |
writeToParcel(Parcel dest,
int flags) |
protected String jsonString
protected JSONObject jsonObject
public static final Parcelable.Creator<Reference> CREATOR
public Reference(String json, boolean ignore)
public Reference(JSONObject jsonObject)
public Reference(Long element) throws JSONException
JSONException
public Reference(String id, String href, Long element) throws JSONException
JSONException
public JSONObject getJSONObject()
public String getId()
public String getHref()
public Long getElement()
public boolean hasId()
public boolean hasHref()
public boolean hasElement()
public void setId(String id) throws JSONException
JSONException
public void setHref(String href) throws JSONException
JSONException
public void setElement(Long element) throws JSONException
JSONException
public int describeContents()
describeContents
in interface Parcelable
public void writeToParcel(Parcel dest, int flags)
writeToParcel
in interface Parcelable