Class Modifier

    • Constructor Detail

      • Modifier

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

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

        public Modifier​(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.
      • Modifier

        public Modifier​(Modifier 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()
        Name of the modifier
      • getAlternateName

        public String getAlternateName()
        Alternate name of the modifier
      • getAvailable

        public Boolean getAvailable()
        True if this modifier is available across all channels
      • getPrice

        public Long getPrice()
        Additional cost when used
      • getModifierGroup

        public Reference getModifierGroup()
      • getMenuModifier

        public MenuModifier getMenuModifier()
        Menu Modifier attribute that can be expanded to menu specific attributes
      • 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
      • isNotNullAlternateName

        public boolean isNotNullAlternateName()
        Checks whether the 'alternateName' field is set and is not null
      • isNotNullAvailable

        public boolean isNotNullAvailable()
        Checks whether the 'available' field is set and is not null
      • isNotNullPrice

        public boolean isNotNullPrice()
        Checks whether the 'price' field is set and is not null
      • isNotNullModifierGroup

        public boolean isNotNullModifierGroup()
        Checks whether the 'modifierGroup' field is set and is not null
      • isNotNullMenuModifier

        public boolean isNotNullMenuModifier()
        Checks whether the 'menuModifier' field is set and is not null
      • 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
      • hasAlternateName

        public boolean hasAlternateName()
        Checks whether the 'alternateName' field has been set, however the value could be null
      • hasAvailable

        public boolean hasAvailable()
        Checks whether the 'available' field has been set, however the value could be null
      • hasPrice

        public boolean hasPrice()
        Checks whether the 'price' field has been set, however the value could be null
      • hasModifierGroup

        public boolean hasModifierGroup()
        Checks whether the 'modifierGroup' field has been set, however the value could be null
      • hasMenuModifier

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

        public Modifier setName​(String name)
        Sets the field 'name'.
      • setAlternateName

        public Modifier setAlternateName​(String alternateName)
        Sets the field 'alternateName'.
      • setAvailable

        public Modifier setAvailable​(Boolean available)
        Sets the field 'available'.
      • setPrice

        public Modifier setPrice​(Long price)
        Sets the field 'price'.
      • setModifierGroup

        public Modifier setModifierGroup​(Reference modifierGroup)
        Sets the field 'modifierGroup'. The parameter is not copied so changes to it will be reflected in this instance and vice-versa.
      • setMenuModifier

        public Modifier setMenuModifier​(MenuModifier menuModifier)
        Sets the field 'menuModifier'. The parameter is not copied so changes to it will be reflected in this instance and vice-versa.
      • 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
      • clearAlternateName

        public void clearAlternateName()
        Clears the 'alternateName' field, the 'has' method for this field will now return false
      • clearAvailable

        public void clearAvailable()
        Clears the 'available' field, the 'has' method for this field will now return false
      • clearPrice

        public void clearPrice()
        Clears the 'price' field, the 'has' method for this field will now return false
      • clearModifierGroup

        public void clearModifierGroup()
        Clears the 'modifierGroup' field, the 'has' method for this field will now return false
      • clearMenuModifier

        public void clearMenuModifier()
        Clears the 'menuModifier' 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 Modifier copyChanges()
        Create a copy of this instance that contains only fields that were set after the constructor was called.
      • mergeChanges

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