public class ItemModifierGroup extends GenericParcelable implements Validator, JSONifiable
IInventoryService
Modifier and Type | Class and Description |
---|---|
static interface |
ItemModifierGroup.Constraints |
JSONifiable.Creator<T>
Parcelable.ClassLoaderCreator<T>, Parcelable.Creator<T>
Modifier and Type | Field and Description |
---|---|
static Parcelable.Creator<ItemModifierGroup> |
CREATOR |
static JSONifiable.Creator<ItemModifierGroup> |
JSON_CREATOR |
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE
Modifier | Constructor and Description |
---|---|
|
ItemModifierGroup()
Constructs a new empty instance.
|
protected |
ItemModifierGroup(boolean noInit)
Constructs a new empty instance.
|
|
ItemModifierGroup(ItemModifierGroup src)
Constructs a new instance that is a deep copy of the source instance.
|
|
ItemModifierGroup(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.
|
|
ItemModifierGroup(String json)
Constructs a new instance from the given JSON String.
|
Modifier and Type | Method and Description |
---|---|
void |
clearItem()
Clears the 'item' field, the 'has' method for this field will now return false
|
void |
clearModifierGroup()
Clears the 'modifierGroup' field, the 'has' method for this field will now return false
|
boolean |
containsChanges()
Returns true if this instance has any changes.
|
ItemModifierGroup |
copyChanges()
Create a copy of this instance that contains only fields that were set after the constructor was called.
|
protected GenericClient |
getGenericClient() |
Item |
getItem() |
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.
|
ModifierGroup |
getModifierGroup() |
boolean |
hasItem()
Checks whether the 'item' field has been set, however the value could be null
|
boolean |
hasModifierGroup()
Checks whether the 'modifierGroup' field has been set, however the value could be null
|
boolean |
isNotNullItem()
Checks whether the 'item' field is set and is not null
|
boolean |
isNotNullModifierGroup()
Checks whether the 'modifierGroup' field is set and is not null
|
void |
mergeChanges(ItemModifierGroup 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.
|
ItemModifierGroup |
setItem(Item item)
Sets the field 'item'.
|
ItemModifierGroup |
setModifierGroup(ModifierGroup modifierGroup)
Sets the field 'modifierGroup'.
|
void |
validate() |
describeContents, getBundle, toString, writeToParcel
public static final Parcelable.Creator<ItemModifierGroup> CREATOR
public static final JSONifiable.Creator<ItemModifierGroup> JSON_CREATOR
public ItemModifierGroup()
protected ItemModifierGroup(boolean noInit)
public ItemModifierGroup(String json) throws IllegalArgumentException
IllegalArgumentException
public ItemModifierGroup(JSONObject jsonObject)
public ItemModifierGroup(ItemModifierGroup src)
public Item getItem()
public ModifierGroup getModifierGroup()
protected GenericClient getGenericClient()
getGenericClient
in class GenericParcelable
public JSONObject getJSONObject()
getJSONObject
in interface JSONifiable
public boolean isNotNullItem()
public boolean isNotNullModifierGroup()
public boolean hasItem()
public boolean hasModifierGroup()
public ItemModifierGroup setItem(Item item)
public ItemModifierGroup setModifierGroup(ModifierGroup modifierGroup)
public void clearItem()
public void clearModifierGroup()
public boolean containsChanges()
public void resetChangeLog()
public ItemModifierGroup copyChanges()
public void mergeChanges(ItemModifierGroup src)