Package org.osgi.service.cdi
Enum MaximumCardinality
- java.lang.Object
-
- java.lang.Enum<MaximumCardinality>
-
- org.osgi.service.cdi.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 $
-
-
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 integerstatic 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.
-
-
-
Enum Constant Detail
-
ONE
public static final MaximumCardinality ONE
Defines a unary reference.
-
MANY
public static final MaximumCardinality MANY
Defines a plural reference.
-
-
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 namejava.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
-
-