public class Screenshot extends GenericParcelable implements Validator, JSONifiable
Modifier and Type | Class and Description |
---|---|
static interface |
Screenshot.Constraints |
JSONifiable.Creator<T>
Parcelable.ClassLoaderCreator<T>, Parcelable.Creator<T>
Modifier and Type | Field and Description |
---|---|
static Parcelable.Creator<Screenshot> |
CREATOR |
static JSONifiable.Creator<Screenshot> |
JSON_CREATOR |
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE
Modifier | Constructor and Description |
---|---|
|
Screenshot()
Constructs a new empty instance.
|
protected |
Screenshot(boolean noInit)
Constructs a new empty instance.
|
|
Screenshot(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.
|
|
Screenshot(Screenshot src)
Constructs a new instance that is a deep copy of the source instance.
|
|
Screenshot(String json)
Constructs a new instance from the given JSON String.
|
Modifier and Type | Method and Description |
---|---|
void |
clearLarge()
Clears the 'large' field, the 'has' method for this field will now return false
|
void |
clearLocale()
Clears the 'locale' field, the 'has' method for this field will now return false
|
void |
clearMedium()
Clears the 'medium' field, the 'has' method for this field will now return false
|
void |
clearName()
Clears the 'name' field, the 'has' method for this field will now return false
|
void |
clearSmall()
Clears the 'small' field, the 'has' method for this field will now return false
|
boolean |
containsChanges()
Returns true if this instance has any changes.
|
Screenshot |
copyChanges()
Create a copy of this instance that contains only fields that were set after the constructor was called.
|
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.
|
String |
getLarge()
URL for the large version (800 x 800) of the app screenshot
|
String |
getLocale()
https://docs.oracle.com/javase/7/docs/api/java/util/Locale.html ISO 639-1 ISO_3166-1_alpha-2 Examples: en_US, de_DE, en_CA, fr_CA
|
String |
getMedium()
URL for the medium version (200 x 200) of the app screenshot
|
String |
getName()
URL for the app screenshot
|
String |
getSmall()
URL for the small version (80 x 80) of the app screenshot
|
boolean |
hasLarge()
Checks whether the 'large' field has been set, however the value could be null
|
boolean |
hasLocale()
Checks whether the 'locale' field has been set, however the value could be null
|
boolean |
hasMedium()
Checks whether the 'medium' field has been set, however the value could be null
|
boolean |
hasName()
Checks whether the 'name' field has been set, however the value could be null
|
boolean |
hasSmall()
Checks whether the 'small' field has been set, however the value could be null
|
boolean |
isNotNullLarge()
Checks whether the 'large' field is set and is not null
|
boolean |
isNotNullLocale()
Checks whether the 'locale' field is set and is not null
|
boolean |
isNotNullMedium()
Checks whether the 'medium' field is set and is not null
|
boolean |
isNotNullName()
Checks whether the 'name' field is set and is not null
|
boolean |
isNotNullSmall()
Checks whether the 'small' field is set and is not null
|
void |
mergeChanges(Screenshot 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.
|
Screenshot |
setLarge(String large)
Sets the field 'large'.
|
Screenshot |
setLocale(String locale)
Sets the field 'locale'.
|
Screenshot |
setMedium(String medium)
Sets the field 'medium'.
|
Screenshot |
setName(String name)
Sets the field 'name'.
|
Screenshot |
setSmall(String small)
Sets the field 'small'.
|
void |
validate() |
describeContents, getBundle, toString, writeToParcel
public static final Parcelable.Creator<Screenshot> CREATOR
public static final JSONifiable.Creator<Screenshot> JSON_CREATOR
public Screenshot()
protected Screenshot(boolean noInit)
public Screenshot(String json) throws IllegalArgumentException
IllegalArgumentException
public Screenshot(JSONObject jsonObject)
public Screenshot(Screenshot src)
public String getName()
public String getLocale()
public String getSmall()
public String getMedium()
public String getLarge()
protected GenericClient getGenericClient()
getGenericClient
in class GenericParcelable
public JSONObject getJSONObject()
getJSONObject
in interface JSONifiable
public boolean isNotNullName()
public boolean isNotNullLocale()
public boolean isNotNullSmall()
public boolean isNotNullMedium()
public boolean isNotNullLarge()
public boolean hasName()
public boolean hasLocale()
public boolean hasSmall()
public boolean hasMedium()
public boolean hasLarge()
public Screenshot setName(String name)
public Screenshot setLocale(String locale)
public Screenshot setSmall(String small)
public Screenshot setMedium(String medium)
public Screenshot setLarge(String large)
public void clearName()
public void clearLocale()
public void clearSmall()
public void clearMedium()
public void clearLarge()
public boolean containsChanges()
public void resetChangeLog()
public Screenshot copyChanges()
public void mergeChanges(Screenshot src)