Enum RelationshipEndCardinality
- java.lang.Object
-
- java.lang.Enum<RelationshipEndCardinality>
-
- org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.RelationshipEndCardinality
-
- All Implemented Interfaces:
Serializable,Comparable<RelationshipEndCardinality>
public enum RelationshipEndCardinality extends Enum<RelationshipEndCardinality> implements Serializable
RelationshipCardinality is used in a RelationshipEndDef to indicate how many relationships of this type can be connected to an entity instance.:- UNKNOWN: uninitialized cardinality
- AT_MOST_ONE: means there can be zero or one instances of this relationship connected to an instance of the EntityDef. This relationship is written as 0..1 in UML.
- ANY_NUMBER: means there can be none, one or many instances of this relationship connected to an instance of the EntityDef. This relationship is often written as 0..* or * in UML.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description ANY_NUMBERAT_MOST_ONEUNKNOWN
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetDescription()Return the default description of the cardinality.StringgetName()Return the default name of the cardinality.intgetOrdinal()Return the numeric representation of the cardinality.StringtoString()toString() JSON-stylestatic RelationshipEndCardinalityvalueOf(String name)Returns the enum constant of this type with the specified name.static RelationshipEndCardinality[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
UNKNOWN
public static final RelationshipEndCardinality UNKNOWN
-
AT_MOST_ONE
public static final RelationshipEndCardinality AT_MOST_ONE
-
ANY_NUMBER
public static final RelationshipEndCardinality ANY_NUMBER
-
-
Method Detail
-
values
public static RelationshipEndCardinality[] 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 (RelationshipEndCardinality c : RelationshipEndCardinality.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static RelationshipEndCardinality 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 nameNullPointerException- 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
-
toString
public String toString()
toString() JSON-style- Overrides:
toStringin classEnum<RelationshipEndCardinality>- Returns:
- string description
-
-