public class AppUsbDevice extends GenericParcelable implements Validator, JSONifiable
Modifier and Type | Class and Description |
---|---|
static interface |
AppUsbDevice.Constraints |
JSONifiable.Creator<T>
Parcelable.ClassLoaderCreator<T>, Parcelable.Creator<T>
Modifier and Type | Field and Description |
---|---|
static Parcelable.Creator<AppUsbDevice> |
CREATOR |
static JSONifiable.Creator<AppUsbDevice> |
JSON_CREATOR |
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE
Modifier | Constructor and Description |
---|---|
|
AppUsbDevice()
Constructs a new empty instance.
|
|
AppUsbDevice(AppUsbDevice src)
Constructs a new instance that is a deep copy of the source instance.
|
protected |
AppUsbDevice(boolean noInit)
Constructs a new empty instance.
|
|
AppUsbDevice(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.
|
|
AppUsbDevice(String json)
Constructs a new instance from the given JSON String.
|
Modifier and Type | Method and Description |
---|---|
void |
clearApp()
Clears the 'app' field, the 'has' method for this field will now return false
|
void |
clearOpenAppMarketIfNotInstalled()
Clears the 'openAppMarketIfNotInstalled' field, the 'has' method for this field will now return false
|
void |
clearPackageName()
Clears the 'packageName' field, the 'has' method for this field will now return false
|
void |
clearProductId()
Clears the 'productId' field, the 'has' method for this field will now return false
|
void |
clearVendorId()
Clears the 'vendorId' field, the 'has' method for this field will now return false
|
boolean |
containsChanges()
Returns true if this instance has any changes.
|
AppUsbDevice |
copyChanges()
Create a copy of this instance that contains only fields that were set after the constructor was called.
|
Reference |
getApp() |
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 |
getOpenAppMarketIfNotInstalled() |
String |
getPackageName() |
Integer |
getProductId() |
Integer |
getVendorId() |
boolean |
hasApp()
Checks whether the 'app' field has been set, however the value could be null
|
boolean |
hasOpenAppMarketIfNotInstalled()
Checks whether the 'openAppMarketIfNotInstalled' field has been set, however the value could be null
|
boolean |
hasPackageName()
Checks whether the 'packageName' field has been set, however the value could be null
|
boolean |
hasProductId()
Checks whether the 'productId' field has been set, however the value could be null
|
boolean |
hasVendorId()
Checks whether the 'vendorId' field has been set, however the value could be null
|
boolean |
isNotNullApp()
Checks whether the 'app' field is set and is not null
|
boolean |
isNotNullOpenAppMarketIfNotInstalled()
Checks whether the 'openAppMarketIfNotInstalled' field is set and is not null
|
boolean |
isNotNullPackageName()
Checks whether the 'packageName' field is set and is not null
|
boolean |
isNotNullProductId()
Checks whether the 'productId' field is set and is not null
|
boolean |
isNotNullVendorId()
Checks whether the 'vendorId' field is set and is not null
|
void |
mergeChanges(AppUsbDevice 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.
|
AppUsbDevice |
setApp(Reference app)
Sets the field 'app'.
|
AppUsbDevice |
setOpenAppMarketIfNotInstalled(Boolean openAppMarketIfNotInstalled)
Sets the field 'openAppMarketIfNotInstalled'.
|
AppUsbDevice |
setPackageName(String packageName)
Sets the field 'packageName'.
|
AppUsbDevice |
setProductId(Integer productId)
Sets the field 'productId'.
|
AppUsbDevice |
setVendorId(Integer vendorId)
Sets the field 'vendorId'.
|
void |
validate() |
describeContents, getBundle, toString, writeToParcel
public static final Parcelable.Creator<AppUsbDevice> CREATOR
public static final JSONifiable.Creator<AppUsbDevice> JSON_CREATOR
public AppUsbDevice()
protected AppUsbDevice(boolean noInit)
public AppUsbDevice(String json) throws IllegalArgumentException
IllegalArgumentException
public AppUsbDevice(JSONObject jsonObject)
public AppUsbDevice(AppUsbDevice src)
public String getPackageName()
public Integer getVendorId()
public Integer getProductId()
public Reference getApp()
public Boolean getOpenAppMarketIfNotInstalled()
protected GenericClient getGenericClient()
getGenericClient
in class GenericParcelable
public JSONObject getJSONObject()
getJSONObject
in interface JSONifiable
public boolean isNotNullPackageName()
public boolean isNotNullVendorId()
public boolean isNotNullProductId()
public boolean isNotNullApp()
public boolean isNotNullOpenAppMarketIfNotInstalled()
public boolean hasPackageName()
public boolean hasVendorId()
public boolean hasProductId()
public boolean hasApp()
public boolean hasOpenAppMarketIfNotInstalled()
public AppUsbDevice setPackageName(String packageName)
public AppUsbDevice setVendorId(Integer vendorId)
public AppUsbDevice setProductId(Integer productId)
public AppUsbDevice setApp(Reference app)
public AppUsbDevice setOpenAppMarketIfNotInstalled(Boolean openAppMarketIfNotInstalled)
public void clearPackageName()
public void clearVendorId()
public void clearProductId()
public void clearApp()
public void clearOpenAppMarketIfNotInstalled()
public boolean containsChanges()
public void resetChangeLog()
public AppUsbDevice copyChanges()
public void mergeChanges(AppUsbDevice src)