public class HourRange extends GenericParcelable implements Validator, JSONifiable
Modifier and Type | Class and Description |
---|---|
static interface |
HourRange.Constraints |
JSONifiable.Creator<T>
Parcelable.ClassLoaderCreator<T>, Parcelable.Creator<T>
Modifier and Type | Field and Description |
---|---|
static Parcelable.Creator<HourRange> |
CREATOR |
static JSONifiable.Creator<HourRange> |
JSON_CREATOR |
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE
Modifier | Constructor and Description |
---|---|
|
HourRange()
Constructs a new empty instance.
|
protected |
HourRange(boolean noInit)
Constructs a new empty instance.
|
|
HourRange(HourRange src)
Constructs a new instance that is a deep copy of the source instance.
|
|
HourRange(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.
|
|
HourRange(String json)
Constructs a new instance from the given JSON String.
|
Modifier and Type | Method and Description |
---|---|
void |
clearEnd()
Clears the 'end' field, the 'has' method for this field will now return false
|
void |
clearStart()
Clears the 'start' field, the 'has' method for this field will now return false
|
boolean |
containsChanges()
Returns true if this instance has any changes.
|
HourRange |
copyChanges()
Create a copy of this instance that contains only fields that were set after the constructor was called.
|
Integer |
getEnd() |
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.
|
Integer |
getStart() |
boolean |
hasEnd()
Checks whether the 'end' field has been set, however the value could be null
|
boolean |
hasStart()
Checks whether the 'start' field has been set, however the value could be null
|
boolean |
isNotNullEnd()
Checks whether the 'end' field is set and is not null
|
boolean |
isNotNullStart()
Checks whether the 'start' field is set and is not null
|
void |
mergeChanges(HourRange 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.
|
HourRange |
setEnd(Integer end)
Sets the field 'end'.
|
HourRange |
setStart(Integer start)
Sets the field 'start'.
|
void |
validate() |
describeContents, getBundle, toString, writeToParcel
public static final Parcelable.Creator<HourRange> CREATOR
public static final JSONifiable.Creator<HourRange> JSON_CREATOR
public HourRange()
protected HourRange(boolean noInit)
public HourRange(String json) throws IllegalArgumentException
IllegalArgumentException
public HourRange(JSONObject jsonObject)
public HourRange(HourRange src)
public Integer getStart()
public Integer getEnd()
protected GenericClient getGenericClient()
getGenericClient
in class GenericParcelable
public JSONObject getJSONObject()
getJSONObject
in interface JSONifiable
public boolean isNotNullStart()
public boolean isNotNullEnd()
public boolean hasStart()
public boolean hasEnd()
public void clearStart()
public void clearEnd()
public boolean containsChanges()
public void resetChangeLog()
public HourRange copyChanges()
public void mergeChanges(HourRange src)