Class HoursSet

    • Constructor Detail

      • HoursSet

        public HoursSet()
        Constructs a new empty instance.
      • HoursSet

        protected HoursSet​(boolean noInit)
        Constructs a new empty instance.
      • HoursSet

        public 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

        public HoursSet​(HoursSet src)
        Constructs a new instance that is a deep copy of the source instance. It does not copy the bundle or changelog.
    • Method Detail

      • getId

        public String getId()
        Unique identifier
      • getName

        public String getName()
        Friendly name to describe the hours
      • getReference

        public Reference getReference()
      • getJSONObject

        public 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.
        Specified by:
        getJSONObject in interface JSONifiable
      • isNotNullId

        public boolean isNotNullId()
        Checks whether the 'id' field is set and is not null
      • isNotNullName

        public boolean isNotNullName()
        Checks whether the 'name' field is set and is not null
      • isNotNullReference

        public boolean isNotNullReference()
        Checks whether the 'reference' field is set and is not null
      • isNotNullSunday

        public boolean isNotNullSunday()
        Checks whether the 'sunday' field is set and is not null
      • isNotEmptySunday

        public boolean isNotEmptySunday()
        Checks whether the 'sunday' field is set and is not null and is not empty
      • isNotNullMonday

        public boolean isNotNullMonday()
        Checks whether the 'monday' field is set and is not null
      • isNotEmptyMonday

        public boolean isNotEmptyMonday()
        Checks whether the 'monday' field is set and is not null and is not empty
      • isNotNullTuesday

        public boolean isNotNullTuesday()
        Checks whether the 'tuesday' field is set and is not null
      • isNotEmptyTuesday

        public boolean isNotEmptyTuesday()
        Checks whether the 'tuesday' field is set and is not null and is not empty
      • isNotNullWednesday

        public boolean isNotNullWednesday()
        Checks whether the 'wednesday' field is set and is not null
      • isNotEmptyWednesday

        public boolean isNotEmptyWednesday()
        Checks whether the 'wednesday' field is set and is not null and is not empty
      • isNotNullThursday

        public boolean isNotNullThursday()
        Checks whether the 'thursday' field is set and is not null
      • isNotEmptyThursday

        public boolean isNotEmptyThursday()
        Checks whether the 'thursday' field is set and is not null and is not empty
      • isNotNullFriday

        public boolean isNotNullFriday()
        Checks whether the 'friday' field is set and is not null
      • isNotEmptyFriday

        public boolean isNotEmptyFriday()
        Checks whether the 'friday' field is set and is not null and is not empty
      • isNotNullSaturday

        public boolean isNotNullSaturday()
        Checks whether the 'saturday' field is set and is not null
      • isNotEmptySaturday

        public boolean isNotEmptySaturday()
        Checks whether the 'saturday' field is set and is not null and is not empty
      • hasId

        public boolean hasId()
        Checks whether the 'id' field has been set, however the value could be null
      • hasName

        public boolean hasName()
        Checks whether the 'name' field has been set, however the value could be null
      • hasReference

        public boolean hasReference()
        Checks whether the 'reference' field has been set, however the value could be null
      • hasSunday

        public boolean hasSunday()
        Checks whether the 'sunday' field has been set, however the value could be null
      • hasMonday

        public boolean hasMonday()
        Checks whether the 'monday' field has been set, however the value could be null
      • hasTuesday

        public boolean hasTuesday()
        Checks whether the 'tuesday' field has been set, however the value could be null
      • hasWednesday

        public boolean hasWednesday()
        Checks whether the 'wednesday' field has been set, however the value could be null
      • hasThursday

        public boolean hasThursday()
        Checks whether the 'thursday' field has been set, however the value could be null
      • hasFriday

        public boolean hasFriday()
        Checks whether the 'friday' field has been set, however the value could be null
      • hasSaturday

        public boolean hasSaturday()
        Checks whether the 'saturday' field has been set, however the value could be null
      • setName

        public HoursSet setName​(String name)
        Sets the field 'name'.
      • setReference

        public HoursSet setReference​(Reference reference)
        Sets the field 'reference'. The parameter is not copied so changes to it will be reflected in this instance and vice-versa.
      • setSunday

        public HoursSet setSunday​(List<HourRange> sunday)
        Sets the field 'sunday'. Nulls in the given List are skipped. List parameter is copied, so it will not reflect any changes, but objects inside it will.
      • setMonday

        public HoursSet setMonday​(List<HourRange> monday)
        Sets the field 'monday'. Nulls in the given List are skipped. List parameter is copied, so it will not reflect any changes, but objects inside it will.
      • setTuesday

        public HoursSet setTuesday​(List<HourRange> tuesday)
        Sets the field 'tuesday'. Nulls in the given List are skipped. List parameter is copied, so it will not reflect any changes, but objects inside it will.
      • setWednesday

        public HoursSet setWednesday​(List<HourRange> wednesday)
        Sets the field 'wednesday'. Nulls in the given List are skipped. List parameter is copied, so it will not reflect any changes, but objects inside it will.
      • setThursday

        public HoursSet setThursday​(List<HourRange> thursday)
        Sets the field 'thursday'. Nulls in the given List are skipped. List parameter is copied, so it will not reflect any changes, but objects inside it will.
      • setFriday

        public HoursSet setFriday​(List<HourRange> friday)
        Sets the field 'friday'. Nulls in the given List are skipped. List parameter is copied, so it will not reflect any changes, but objects inside it will.
      • setSaturday

        public HoursSet setSaturday​(List<HourRange> saturday)
        Sets the field 'saturday'. Nulls in the given List are skipped. List parameter is copied, so it will not reflect any changes, but objects inside it will.
      • clearId

        public void clearId()
        Clears the 'id' field, the 'has' method for this field will now return false
      • clearName

        public void clearName()
        Clears the 'name' field, the 'has' method for this field will now return false
      • clearReference

        public void clearReference()
        Clears the 'reference' field, the 'has' method for this field will now return false
      • clearSunday

        public void clearSunday()
        Clears the 'sunday' field, the 'has' method for this field will now return false
      • clearMonday

        public void clearMonday()
        Clears the 'monday' field, the 'has' method for this field will now return false
      • clearTuesday

        public void clearTuesday()
        Clears the 'tuesday' field, the 'has' method for this field will now return false
      • clearWednesday

        public void clearWednesday()
        Clears the 'wednesday' field, the 'has' method for this field will now return false
      • clearThursday

        public void clearThursday()
        Clears the 'thursday' field, the 'has' method for this field will now return false
      • clearFriday

        public void clearFriday()
        Clears the 'friday' field, the 'has' method for this field will now return false
      • clearSaturday

        public void clearSaturday()
        Clears the 'saturday' field, the 'has' method for this field will now return false
      • containsChanges

        public boolean containsChanges()
        Returns true if this instance has any changes.
      • resetChangeLog

        public void resetChangeLog()
        Reset the log of changes made to this instance, calling copyChanges() after this would return an empty instance.
      • copyChanges

        public HoursSet copyChanges()
        Create a copy of this instance that contains only fields that were set after the constructor was called.
      • mergeChanges

        public void mergeChanges​(HoursSet src)
        Copy all the changed fields from the given source to this instance.