Enum MaximumCardinality

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Comparable<MaximumCardinality>

    public enum MaximumCardinality
    extends java.lang.Enum<MaximumCardinality>
    Defines the possible values for maximum cardinality of dependencies.
    Author:
    $Id: 118aef9be2beb066601741b3c53f072e73214b45 $
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
      MANY
      Defines a plural reference.
      ONE
      Defines a unary reference.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      static MaximumCardinality fromInt​(int value)
      Resolve an integer to an upper cardinality boundary.
      int toInt()
      Convert this upper cardinality boundary to an integer
      static MaximumCardinality valueOf​(java.lang.String name)
      Returns the enum constant of this type with the specified name.
      static MaximumCardinality[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      • Methods inherited from class java.lang.Enum

        clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
      • Methods inherited from class java.lang.Object

        getClass, notify, notifyAll, wait, wait, wait
    • Method Detail

      • values

        public static MaximumCardinality[] 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 (MaximumCardinality c : MaximumCardinality.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static MaximumCardinality valueOf​(java.lang.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:
        java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
        java.lang.NullPointerException - if the argument is null
      • toInt

        public int toInt()
        Convert this upper cardinality boundary to an integer
        Returns:
        The integer representation of this upper cardinality boundary
      • fromInt

        public static MaximumCardinality fromInt​(int value)
        Resolve an integer to an upper cardinality boundary.
        Parameters:
        value - The integer representation of an upper cardinality boundary
        Returns:
        The enum representation of the upper cardinality boundary described by value