Package com.clover.sdk.v1.base
Class Reference
- java.lang.Object
-
- com.clover.sdk.v1.base.Reference
-
- All Implemented Interfaces:
Parcelable
public class Reference extends Object implements Parcelable
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Reference.Builder
-
Nested classes/interfaces inherited from interface android.os.Parcelable
Parcelable.ClassLoaderCreator<T extends Object>, Parcelable.Creator<T extends Object>
-
-
Field Summary
Fields Modifier and Type Field Description static Parcelable.Creator<Reference>
CREATOR
protected JSONObject
jsonObject
protected String
jsonString
-
Fields inherited from interface android.os.Parcelable
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
describeContents()
Long
getElement()
Reference ObjectString
getHref()
String
getId()
Unique identifierJSONObject
getJSONObject()
boolean
hasElement()
Checks whether the 'element' field has been setboolean
hasHref()
Checks whether the 'href' field has been setboolean
hasId()
Checks whether the 'id' field has been setvoid
setElement(Long element)
void
setHref(String href)
void
setId(String id)
void
writeToParcel(Parcel dest, int flags)
-
-
-
Field Detail
-
jsonString
protected String jsonString
-
jsonObject
protected JSONObject jsonObject
-
CREATOR
public static final Parcelable.Creator<Reference> CREATOR
-
-
Constructor Detail
-
Reference
public Reference(String json, boolean ignore)
-
Reference
public Reference(JSONObject jsonObject)
-
Reference
public Reference(Long element) throws JSONException
- Throws:
JSONException
-
Reference
public Reference(String id, String href, Long element) throws JSONException
- Throws:
JSONException
-
-
Method Detail
-
getJSONObject
public JSONObject getJSONObject()
-
getId
public String getId()
Unique identifier
-
getHref
public String getHref()
-
getElement
public Long getElement()
Reference Object
-
hasId
public boolean hasId()
Checks whether the 'id' field has been set
-
hasHref
public boolean hasHref()
Checks whether the 'href' field has been set
-
hasElement
public boolean hasElement()
Checks whether the 'element' field has been set
-
setId
public void setId(String id) throws JSONException
- Throws:
JSONException
-
setHref
public void setHref(String href) throws JSONException
- Throws:
JSONException
-
setElement
public void setElement(Long element) throws JSONException
- Throws:
JSONException
-
describeContents
public int describeContents()
- Specified by:
describeContents
in interfaceParcelable
-
writeToParcel
public void writeToParcel(Parcel dest, int flags)
- Specified by:
writeToParcel
in interfaceParcelable
-
-