public class HoursSet extends GenericParcelable implements Validator, JSONifiable
Modifier and Type | Class and Description |
---|---|
static interface |
HoursSet.Constraints |
JSONifiable.Creator<T>
Parcelable.ClassLoaderCreator<T>, Parcelable.Creator<T>
Modifier and Type | Field and Description |
---|---|
static Parcelable.Creator<HoursSet> |
CREATOR |
static JSONifiable.Creator<HoursSet> |
JSON_CREATOR |
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE
Modifier | Constructor and Description |
---|---|
|
HoursSet()
Constructs a new empty instance.
|
protected |
HoursSet(boolean noInit)
Constructs a new empty instance.
|
|
HoursSet(HoursSet src)
Constructs a new instance that is a deep copy of the source instance.
|
|
HoursSet(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.
|
|
HoursSet(String json)
Constructs a new instance from the given JSON String.
|
Modifier and Type | Method and Description |
---|---|
void |
clearFriday()
Clears the 'friday' field, the 'has' method for this field will now return false
|
void |
clearId()
Clears the 'id' field, the 'has' method for this field will now return false
|
void |
clearMonday()
Clears the 'monday' 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 |
clearReference()
Clears the 'reference' field, the 'has' method for this field will now return false
|
void |
clearSaturday()
Clears the 'saturday' field, the 'has' method for this field will now return false
|
void |
clearSunday()
Clears the 'sunday' field, the 'has' method for this field will now return false
|
void |
clearThursday()
Clears the 'thursday' field, the 'has' method for this field will now return false
|
void |
clearTuesday()
Clears the 'tuesday' field, the 'has' method for this field will now return false
|
void |
clearWednesday()
Clears the 'wednesday' field, the 'has' method for this field will now return false
|
boolean |
containsChanges()
Returns true if this instance has any changes.
|
HoursSet |
copyChanges()
Create a copy of this instance that contains only fields that were set after the constructor was called.
|
List<HourRange> |
getFriday() |
protected GenericClient |
getGenericClient() |
String |
getId()
Unique identifier
|
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.
|
List<HourRange> |
getMonday() |
String |
getName()
Friendly name to describe the hours
|
Reference |
getReference() |
List<HourRange> |
getSaturday() |
List<HourRange> |
getSunday() |
List<HourRange> |
getThursday() |
List<HourRange> |
getTuesday() |
List<HourRange> |
getWednesday() |
boolean |
hasFriday()
Checks whether the 'friday' field has been set, however the value could be null
|
boolean |
hasId()
Checks whether the 'id' field has been set, however the value could be null
|
boolean |
hasMonday()
Checks whether the 'monday' 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 |
hasReference()
Checks whether the 'reference' field has been set, however the value could be null
|
boolean |
hasSaturday()
Checks whether the 'saturday' field has been set, however the value could be null
|
boolean |
hasSunday()
Checks whether the 'sunday' field has been set, however the value could be null
|
boolean |
hasThursday()
Checks whether the 'thursday' field has been set, however the value could be null
|
boolean |
hasTuesday()
Checks whether the 'tuesday' field has been set, however the value could be null
|
boolean |
hasWednesday()
Checks whether the 'wednesday' field has been set, however the value could be null
|
boolean |
isNotEmptyFriday()
Checks whether the 'friday' field is set and is not null and is not empty
|
boolean |
isNotEmptyMonday()
Checks whether the 'monday' field is set and is not null and is not empty
|
boolean |
isNotEmptySaturday()
Checks whether the 'saturday' field is set and is not null and is not empty
|
boolean |
isNotEmptySunday()
Checks whether the 'sunday' field is set and is not null and is not empty
|
boolean |
isNotEmptyThursday()
Checks whether the 'thursday' field is set and is not null and is not empty
|
boolean |
isNotEmptyTuesday()
Checks whether the 'tuesday' field is set and is not null and is not empty
|
boolean |
isNotEmptyWednesday()
Checks whether the 'wednesday' field is set and is not null and is not empty
|
boolean |
isNotNullFriday()
Checks whether the 'friday' field is set and is not null
|
boolean |
isNotNullId()
Checks whether the 'id' field is set and is not null
|
boolean |
isNotNullMonday()
Checks whether the 'monday' field is set and is not null
|
boolean |
isNotNullName()
Checks whether the 'name' field is set and is not null
|
boolean |
isNotNullReference()
Checks whether the 'reference' field is set and is not null
|
boolean |
isNotNullSaturday()
Checks whether the 'saturday' field is set and is not null
|
boolean |
isNotNullSunday()
Checks whether the 'sunday' field is set and is not null
|
boolean |
isNotNullThursday()
Checks whether the 'thursday' field is set and is not null
|
boolean |
isNotNullTuesday()
Checks whether the 'tuesday' field is set and is not null
|
boolean |
isNotNullWednesday()
Checks whether the 'wednesday' field is set and is not null
|
void |
mergeChanges(HoursSet 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.
|
HoursSet |
setFriday(List<HourRange> friday)
Sets the field 'friday'.
|
HoursSet |
setId(String id)
Sets the field 'id'.
|
HoursSet |
setMonday(List<HourRange> monday)
Sets the field 'monday'.
|
HoursSet |
setName(String name)
Sets the field 'name'.
|
HoursSet |
setReference(Reference reference)
Sets the field 'reference'.
|
HoursSet |
setSaturday(List<HourRange> saturday)
Sets the field 'saturday'.
|
HoursSet |
setSunday(List<HourRange> sunday)
Sets the field 'sunday'.
|
HoursSet |
setThursday(List<HourRange> thursday)
Sets the field 'thursday'.
|
HoursSet |
setTuesday(List<HourRange> tuesday)
Sets the field 'tuesday'.
|
HoursSet |
setWednesday(List<HourRange> wednesday)
Sets the field 'wednesday'.
|
void |
validate() |
describeContents, getBundle, toString, writeToParcel
public static final Parcelable.Creator<HoursSet> CREATOR
public static final JSONifiable.Creator<HoursSet> JSON_CREATOR
public HoursSet()
protected HoursSet(boolean noInit)
public HoursSet(String json) throws IllegalArgumentException
IllegalArgumentException
public HoursSet(JSONObject jsonObject)
public HoursSet(HoursSet src)
public String getId()
public String getName()
public Reference getReference()
protected GenericClient getGenericClient()
getGenericClient
in class GenericParcelable
public JSONObject getJSONObject()
getJSONObject
in interface JSONifiable
public boolean isNotNullId()
public boolean isNotNullName()
public boolean isNotNullReference()
public boolean isNotNullSunday()
public boolean isNotEmptySunday()
public boolean isNotNullMonday()
public boolean isNotEmptyMonday()
public boolean isNotNullTuesday()
public boolean isNotEmptyTuesday()
public boolean isNotNullWednesday()
public boolean isNotEmptyWednesday()
public boolean isNotNullThursday()
public boolean isNotEmptyThursday()
public boolean isNotNullFriday()
public boolean isNotEmptyFriday()
public boolean isNotNullSaturday()
public boolean isNotEmptySaturday()
public boolean hasId()
public boolean hasName()
public boolean hasReference()
public boolean hasSunday()
public boolean hasMonday()
public boolean hasTuesday()
public boolean hasWednesday()
public boolean hasThursday()
public boolean hasFriday()
public boolean hasSaturday()
public HoursSet setReference(Reference reference)
public HoursSet setSunday(List<HourRange> sunday)
public HoursSet setMonday(List<HourRange> monday)
public HoursSet setTuesday(List<HourRange> tuesday)
public HoursSet setWednesday(List<HourRange> wednesday)
public HoursSet setThursday(List<HourRange> thursday)
public HoursSet setFriday(List<HourRange> friday)
public HoursSet setSaturday(List<HourRange> saturday)
public void clearId()
public void clearName()
public void clearReference()
public void clearSunday()
public void clearMonday()
public void clearTuesday()
public void clearWednesday()
public void clearThursday()
public void clearFriday()
public void clearSaturday()
public boolean containsChanges()
public void resetChangeLog()
public HoursSet copyChanges()
public void mergeChanges(HoursSet src)