Enum AttributeCardinality

  • All Implemented Interfaces:
    Serializable, Comparable<AttributeCardinality>

    public enum AttributeCardinality
    extends Enum<AttributeCardinality>
    implements Serializable
    AttributeCardinality is used on a association from one TypeDef to another. It defines how many instances the "linked to" TypeDef are permitted to be connected to the "linked from" TypeDef:
    • UNKNOWN: uninitialized cardinality
    • AT_MOST_ONE: means there can be zero or one instances connected to an instance of this TypeDef. This relationship is often written as 0..1.
    • ONE_ONLY: means there must be one instance, no more and no less.
    • AT_LEAST_ONE_ORDERED: means there must be one or more instances connected to an instance of this TypeDef. This relationship is often written as 1..*. The linked instances are maintained in an ordered list/array.
    • AT_LEAST_ONE_UNORDERED: means there must be one or more instances connected to an instance of this TypeDef. This relationship is often written as 1..*. The linked instances are maintained in an unordered set.
    • ANY_NUMBER_ORDERED: means there can be none, one or many instances connected an instance of this TypeDef. This relationship is often written as 0..*. The linked instances are maintained in an ordered list/array.
    • ANY_NUMBER_UNORDERED: means there can be none, one or many instances connected an instance of this TypeDef. This relationship is often written as 0..*. The linked instances are maintained in an unordered set.
    • Method Detail

      • values

        public static AttributeCardinality[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (AttributeCardinality c : AttributeCardinality.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static AttributeCardinality valueOf​(String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        Parameters:
        name - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        IllegalArgumentException - if this enum type has no constant with the specified name
        NullPointerException - if the argument is null
      • getOrdinal

        public int getOrdinal()
        Return the numeric representation of the cardinality.
        Returns:
        int ordinal
      • getName

        public String getName()
        Return the default name of the cardinality.
        Returns:
        String name
      • getDescription

        public String getDescription()
        Return the default description of the cardinality.
        Returns:
        String description