001package arez.annotations; 002 003/** 004 * Defines the multiplicity of the {@link Inverse} relationship for {@link Reference}. 005 */ 006public enum Multiplicity 007{ 008 /** 009 * The inverse is related to many references. The type of the inverse must be one of 010 * {@link java.util.Collection}, {@link java.util.List} or a {@link java.util.Set} with 011 * a type parameter compatible with the class containing the method annotated with the 012 * {@link Reference} annotation. 013 */ 014 MANY, 015 /** 016 * The inverse is related to exactly one reference. The type of the inverse must be 017 * compatible with the class containing the method annotated with the {@link Reference} 018 * annotation. The inverse MUST be annotated with {@link javax.annotation.Nonnull} 019 */ 020 ONE, 021 /** 022 * The inverse is related to one or no reference. The type of the inverse must be 023 * compatible with the class containing the method annotated with the {@link Reference} 024 * annotation. The inverse MUST be annotated with {@link javax.annotation.Nullable} 025 */ 026 ZERO_OR_ONE 027}