Interface AttributeDefinition

  • All Superinterfaces:
    Attribute
    All Known Subinterfaces:
    PropertyDefinition
    All Known Implementing Classes:
    PropertyDefinitionImpl

    public interface AttributeDefinition
    extends Attribute
    Extends the Attribute interface to include properties that define its requirement constraints.

    This interface adds flags to specify whether an attribute is mandatory and whether its value can be null.

    Author:
    Luca Frosini (ISTI - CNR)
    See Also:
    Attribute
    • Method Detail

      • isMandatory

        boolean isMandatory()
        Checks if the attribute is mandatory.
        Returns:
        true if the attribute is mandatory, false otherwise.
      • setMandatory

        void setMandatory​(boolean mandatory)
        Sets whether the attribute is mandatory.
        Parameters:
        mandatory - true to make the attribute mandatory, false otherwise.
      • isNotnull

        boolean isNotnull()
        Checks if the attribute's value cannot be null.
        Returns:
        true if the attribute value must not be null, false otherwise.
      • setNotnull

        void setNotnull​(boolean notnull)
        Sets whether the attribute's value can be null.
        Parameters:
        notnull - true to enforce a non-null value, false otherwise.