public class AnalyticalEvent extends GenericParcelable implements Validator, JSONifiable
Modifier and Type | Class and Description |
---|---|
static interface |
AnalyticalEvent.Constraints |
JSONifiable.Creator<T>
Parcelable.ClassLoaderCreator<T>, Parcelable.Creator<T>
Modifier and Type | Field and Description |
---|---|
static Parcelable.Creator<AnalyticalEvent> |
CREATOR |
static JSONifiable.Creator<AnalyticalEvent> |
JSON_CREATOR |
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE
Modifier | Constructor and Description |
---|---|
|
AnalyticalEvent()
Constructs a new empty instance.
|
|
AnalyticalEvent(AnalyticalEvent src)
Constructs a new instance that is a deep copy of the source instance.
|
protected |
AnalyticalEvent(boolean noInit)
Constructs a new empty instance.
|
|
AnalyticalEvent(JSONObject jsonObject)
Construct a new instance backed by the given JSONObject, the parameter is not copied so changes to it will be
reflected in this instance and vice-versa.
|
|
AnalyticalEvent(String json)
Constructs a new instance from the given JSON String.
|
Modifier and Type | Method and Description |
---|---|
void |
clearEvent()
Clears the 'event' field, the 'has' method for this field will now return false
|
void |
clearPayload()
Clears the 'payload' field, the 'has' method for this field will now return false
|
boolean |
containsChanges()
Returns true if this instance has any changes.
|
AnalyticalEvent |
copyChanges()
Create a copy of this instance that contains only fields that were set after the constructor was called.
|
Event |
getEvent() |
protected GenericClient |
getGenericClient() |
JSONObject |
getJSONObject()
Returns the internal JSONObject backing this instance, the return value is not a copy so changes to it will be
reflected in this instance and vice-versa.
|
Reference |
getPayload() |
boolean |
hasEvent()
Checks whether the 'event' field has been set, however the value could be null
|
boolean |
hasPayload()
Checks whether the 'payload' field has been set, however the value could be null
|
boolean |
isNotNullEvent()
Checks whether the 'event' field is set and is not null
|
boolean |
isNotNullPayload()
Checks whether the 'payload' field is set and is not null
|
void |
mergeChanges(AnalyticalEvent src)
Copy all the changed fields from the given source to this instance.
|
void |
resetChangeLog()
Reset the log of changes made to this instance, calling copyChanges() after this would return an empty instance.
|
AnalyticalEvent |
setEvent(Event event)
Sets the field 'event'.
|
AnalyticalEvent |
setPayload(Reference payload)
Sets the field 'payload'.
|
void |
validate() |
describeContents, getBundle, toString, writeToParcel
public static final Parcelable.Creator<AnalyticalEvent> CREATOR
public static final JSONifiable.Creator<AnalyticalEvent> JSON_CREATOR
public AnalyticalEvent()
protected AnalyticalEvent(boolean noInit)
public AnalyticalEvent(String json) throws IllegalArgumentException
IllegalArgumentException
public AnalyticalEvent(JSONObject jsonObject)
public AnalyticalEvent(AnalyticalEvent src)
public Event getEvent()
public Reference getPayload()
protected GenericClient getGenericClient()
getGenericClient
in class GenericParcelable
public JSONObject getJSONObject()
getJSONObject
in interface JSONifiable
public boolean isNotNullEvent()
public boolean isNotNullPayload()
public boolean hasEvent()
public boolean hasPayload()
public AnalyticalEvent setEvent(Event event)
public AnalyticalEvent setPayload(Reference payload)
public void clearEvent()
public void clearPayload()
public boolean containsChanges()
public void resetChangeLog()
public AnalyticalEvent copyChanges()
public void mergeChanges(AnalyticalEvent src)