|
Media Authoring with Java API |
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface TypeDefinitionEnumeration
Specifies the definition of a property type that can have one of a set of
integer values. Every element in the set has both an integer value and a string label. The
enumeration type is equivalent to the Java Enum
type.
makeTypeDefinitionEnumeration()
,
TypeCategory.Enum
,
Enum
Method Summary | |
---|---|
int |
countElements()
Returns the number of enumeration elements contained in the list of elements of this enumeration type definition. |
PropertyValue |
createValueFromName(String name)
Creates and returns an enumeration property value of this enumeration type using the given enumeration element name. |
String |
getElementName(int index)
Returns the name of the enumeration element at the given index into the list of elements of this enumeration type definition. |
TypeDefinition |
getElementType()
Returns the type definition of the integer values that are found in this enumeration. |
long |
getElementValue(int index)
Returns the integer value associated with the enumeration element at the given index in the list of elements of this enumeration type definition. |
Class<Enum<?>> |
getEnumeration()
Returns the Enum Java type associated with
this enumeration type definition. |
long |
getIntegerValue(PropertyValue enumerationProperty)
Returns the integer value associated with the given enumeration property value as defined by this enumeration type definition. |
String |
getNameFromInteger(long value)
Returns the name element with the given integer in this enumeration type definition. |
String |
getNameFromValue(PropertyValue value)
Returns the name associated with the given enumeration property value as defined by this enumeration type definition. |
Methods inherited from interface tv.amwa.maj.iface.TypeDefinition |
---|
createValue, getTypeCategory |
Methods inherited from interface tv.amwa.maj.iface.MetaDefinition |
---|
getAUID, getDescription, getName, setDescription, setName |
Method Detail |
---|
PropertyValue createValueFromName(@AAFString String name) throws NullPointerException, InvalidParameterException
Creates and returns an enumeration property value of this enumeration type using the given enumeration element name.
name
- Name of an enumeration element to create a property value
for.
NullPointerException
- The given element name is null
.
InvalidParameterException
- The given name is not in the
list of element names for this enumeration type.TypeDefinition getElementType()
Returns the type definition of the integer
values that are found in this enumeration. For data types created using the MAJ API, this
is always an Int32
.
TypeDefinitionInteger
@UInt64 long getElementValue(@UInt32 int index) throws IndexOutOfBoundsException
Returns the integer value associated with the enumeration element at the given index in the list of elements of this enumeration type definition.
index
- 0-based index of the integer value to retrieve from the list of elements of
this enumeration type definition.
IndexOutOfBoundsException
- The given index is outside the
acceptable range for the enumeration type definition.@AAFString String getElementName(@UInt32 int index) throws IndexOutOfBoundsException
Returns the name of the enumeration element at the given index into the list of elements of this enumeration type definition.
index
- 0-based index of the name to retrieve from the list of elements
of this enumeration type definition.
IndexOutOfBoundsException
@UInt32 int countElements()
Returns the number of enumeration elements contained in the list of elements of this enumeration type definition.
@AAFString String getNameFromValue(PropertyValue value) throws NullPointerException, IllegalPropertyValueException
Returns the name associated with the given enumeration property value as defined by this enumeration type definition.
value
- Enumeration property value to find the name of.
NullPointerException
- The given property value is null
.
IllegalPropertyValueException
- The given property value is not
a value of this enumeration property type.@AAFString String getNameFromInteger(@Int64 long value) throws IllegalPropertyValueException
Returns the name element with the given integer in this enumeration type definition.
value
- Integer value associated with an enumeration
element.
IllegalPropertyValueException
- The given value is not associated
with an enumeration element in this enumeration type definition.@Int64 long getIntegerValue(PropertyValue enumerationProperty) throws NullPointerException, IllegalPropertyValueException
Returns the integer value associated with the given enumeration property value as defined by this enumeration type definition.
enumerationProperty
- Enumeration property value
to find the associated integer for.
NullPointerException
- The given enumeration property is
null
.
IllegalPropertyValueException
- The given property value is not
defined by the enumeration type definition.Class<Enum<?>> getEnumeration()
Returns the Enum
Java type associated with
this enumeration type definition.
|
Media Authoring with Java API |
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |