Enum Class Multiplicity

java.lang.Object
java.lang.Enum<Multiplicity>
arez.annotations.Multiplicity
All Implemented Interfaces:
Serializable, Comparable<Multiplicity>, Constable

public enum Multiplicity extends Enum<Multiplicity>
Defines the multiplicity of the Inverse relationship for Reference.
  • Enum Constant Details

    • MANY

      public static final Multiplicity MANY
      The inverse is related to many references. The type of the inverse must be one of Collection, List or a Set with a type parameter compatible with the class containing the method annotated with the Reference annotation.
    • ONE

      public static final Multiplicity ONE
      The inverse is related to exactly one reference. The type of the inverse must be compatible with the class containing the method annotated with the Reference annotation. The inverse MUST be annotated with Nonnull
    • ZERO_OR_ONE

      public static final Multiplicity ZERO_OR_ONE
      The inverse is related to one or no reference. The type of the inverse must be compatible with the class containing the method annotated with the Reference annotation. The inverse MUST be annotated with Nullable
  • Method Details

    • values

      public static Multiplicity[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static Multiplicity valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class has no constant with the specified name
      NullPointerException - if the argument is null