|
Media Authoring with Java API |
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface TypeDefinitionSet
Specifies the definition of a property type that has a collection of object references to uniquely identified objects. The order of the objects has no meaning.
Note that the element type for a set must be a reference type. For example and as a result, it is not possible to define a set of integer values.
makeTypeDefinitionSet()
,
TypeCategory.Set
,
TypeDefinitionFixedArray
,
TypeDefinitionVariableArray
Method Summary | |
---|---|
void |
addElement(PropertyValue setPropertyValue,
PropertyValue elementPropertyValue)
Adds the given element to the given set, which is represented by the given property value of this set type definition. |
boolean |
containsElement(PropertyValue setPropertyValue,
PropertyValue elementPropertyValue)
Returns true if the given element is contained in
the given set; otherwise false . |
PropertyValue |
createEmptySet()
Create a property value with an empty set, ready to hold property values of this type definitions element type. |
int |
getCount(PropertyValue setPropertyValue)
Returns the number of elements in the given set, or -1 if the set is null . |
Set<PropertyValue> |
getElements(PropertyValue setPropertyValue)
Returns a copy of the set of all the elements in the given set property value. |
TypeDefinitionObjectReference |
getElementType()
Returns the type of elements referenced from the defined set. |
void |
removeElement(PropertyValue setPropertyValue,
PropertyValue elementPropertyValue)
Removes the given element from the given set, which is represented by the given property value of this set 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 |
---|
TypeDefinitionObjectReference getElementType()
Returns the type of elements referenced from the defined set.
TypeDefinitionObjectReference.getObjectType()
void addElement(PropertyValue setPropertyValue, PropertyValue elementPropertyValue) throws NullPointerException, IllegalPropertyValueException, BadTypeException
Adds the given element to the given set, which is represented by the given property value of this set type definition.
setPropertyValue
- Set to add the given element to.elementPropertyValue
- Element to add to the given set.
NullPointerException
- One or both of the arguments is/are null
.
IllegalPropertyValueException
- The type of the given property value
does not match this set type definition.
BadTypeException
- The type of the given element property value
does not match the element type of this set type definition.void removeElement(PropertyValue setPropertyValue, PropertyValue elementPropertyValue) throws NullPointerException, IllegalPropertyValueException, BadTypeException, ObjectNotFoundException
Removes the given element from the given set, which is represented by the given property value of this set type definition.
setPropertyValue
- Set to remove the given element from.elementPropertyValue
- Element to remove from the given set.
NullPointerException
- One or both of the arguments is/are null
.
IllegalPropertyValueException
- The type of the given property value
does not match this set type definition.
BadTypeException
- The type of the given element for removal does
not match the element type of this set type definition.
ObjectNotFoundException
- The given element to remove cannot
be found in the given set property value.@Bool boolean containsElement(PropertyValue setPropertyValue, PropertyValue elementPropertyValue) throws NullPointerException, IllegalPropertyValueException
Returns true
if the given element is contained in
the given set; otherwise false
. The set to test membership for is
represented by the given property value of this set type definition.
setPropertyValue
- Set to check for the given element.elementPropertyValue
- Element to check for in the given set.
NullPointerException
- One or both of the arguments is/are null
.
IllegalPropertyValueException
- The type of the given property value does
not match this set type definition.@UInt32 int getCount(PropertyValue setPropertyValue) throws NullPointerException, IllegalPropertyValueException
Returns the number of elements in the given set, or -1
if the set is null
. The set to count the members for is
represented by the given property value of this set type definition.
setPropertyValue
- Property value containing a set.
NullPointerException
- The given set property value is null
.
IllegalPropertyValueException
- The type of the given property value
does not match this set type definition.Set<PropertyValue> getElements(PropertyValue setPropertyValue) throws NullPointerException, IllegalPropertyValueException
Returns a copy of the set of all the elements in the given set property value.
setPropertyValue
- Property value to read and returns the elements
for.
NullPointerException
- The given set property value is null
.
IllegalPropertyValueException
- The type of the given argument does not
match this set type definition.PropertyValue createEmptySet()
Create a property value with an empty set, ready to hold property values
of this type definitions element type. Call
addElement(PropertyValue, PropertyValue)
to add elements to this
set.
|
Media Authoring with Java API |
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |