public class CustomActivity extends GenericParcelable implements Validator, JSONifiable
Modifier and Type | Class and Description |
---|---|
static interface |
CustomActivity.Constraints |
JSONifiable.Creator<T>
Parcelable.ClassLoaderCreator<T>, Parcelable.Creator<T>
Modifier and Type | Field and Description |
---|---|
static Parcelable.Creator<CustomActivity> |
CREATOR |
static JSONifiable.Creator<CustomActivity> |
JSON_CREATOR |
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE
Modifier | Constructor and Description |
---|---|
|
CustomActivity()
Constructs a new empty instance.
|
protected |
CustomActivity(boolean noInit)
Constructs a new empty instance.
|
|
CustomActivity(CustomActivity src)
Constructs a new instance that is a deep copy of the source instance.
|
|
CustomActivity(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.
|
|
CustomActivity(String json)
Constructs a new instance from the given JSON String.
|
Modifier and Type | Method and Description |
---|---|
void |
clearAction()
Clears the 'action' field, the 'has' method for this field will now return false
|
void |
clearCategories()
Clears the 'categories' field, the 'has' method for this field will now return false
|
boolean |
containsChanges()
Returns true if this instance has any changes.
|
CustomActivity |
copyChanges()
Create a copy of this instance that contains only fields that were set after the constructor was called.
|
String |
getAction()
Action for the custom activity
|
List<String> |
getCategories()
List of categories for the specified action.
|
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.
|
boolean |
hasAction()
Checks whether the 'action' field has been set, however the value could be null
|
boolean |
hasCategories()
Checks whether the 'categories' field has been set, however the value could be null
|
boolean |
isNotEmptyCategories()
Checks whether the 'categories' field is set and is not null and is not empty
|
boolean |
isNotNullAction()
Checks whether the 'action' field is set and is not null
|
boolean |
isNotNullCategories()
Checks whether the 'categories' field is set and is not null
|
void |
mergeChanges(CustomActivity 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.
|
CustomActivity |
setAction(String action)
Sets the field 'action'.
|
CustomActivity |
setCategories(List<String> categories)
Sets the field 'categories'.
|
void |
validate() |
describeContents, getBundle, toString, writeToParcel
public static final Parcelable.Creator<CustomActivity> CREATOR
public static final JSONifiable.Creator<CustomActivity> JSON_CREATOR
public CustomActivity()
protected CustomActivity(boolean noInit)
public CustomActivity(String json) throws IllegalArgumentException
IllegalArgumentException
public CustomActivity(JSONObject jsonObject)
public CustomActivity(CustomActivity src)
public String getAction()
protected GenericClient getGenericClient()
getGenericClient
in class GenericParcelable
public JSONObject getJSONObject()
getJSONObject
in interface JSONifiable
public boolean isNotNullAction()
public boolean isNotNullCategories()
public boolean isNotEmptyCategories()
public boolean hasAction()
public boolean hasCategories()
public CustomActivity setAction(String action)
public CustomActivity setCategories(List<String> categories)
public void clearAction()
public void clearCategories()
public boolean containsChanges()
public void resetChangeLog()
public CustomActivity copyChanges()
public void mergeChanges(CustomActivity src)