TypeDefinitionCharacter (Media Authoring with Java API)
Date: 2016-02-05

tv.amwa.maj.meta

## Interface TypeDefinitionCharacter

- All Superinterfaces:
    MetadataObject, MetaDefinition, TypeDefinition, WeakReferenceTarget
  All Known Implementing Classes:
    TypeDefinitionCharacterImpl

      public interface TypeDefinitionCharacter
      extends TypeDefinition

  Specifies the definition of a property type that has a value of a single 2-byte character. The AAF character type is equivalent to the Java `char` primitive type and a value of `Character`.

  See Also:
    `TypeCategory.Character`, `Character`

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `TypeDefinitionCharacter` | `clone()` Create a cloned copy of this character type definition.
    `PropertyValue` | `createValueFromCharacter(char character)` Create a new property value of character type from the given single character.
    `char` | `getCharacter(PropertyValue characterProperty)` Returns the character that is the value of the given character property value.
    `void` | `setCharacter(PropertyValue characterProperty, char character)` Sets the given character as the value of the given character property value.

    - ### Methods inherited from interface tv.amwa.maj.meta.TypeDefinition

      `createFromBytes, createValue, getPropertyValue, getTypeCategory, lengthAsBytes, resolveReferences, setPropertyValue, writeAsBytes, writeAsStructuredStorageBytes`

    - ### Methods inherited from interface tv.amwa.maj.meta.MetaDefinition

      `appendMetadictXML, deepEquals, equals, getAAFNamesInUse, getAliases, getAUID, getDescription, getName, getNamespace, getPrefix, getSymbol, hashCode, setAAFNamesInUse, setDescription, setName, setNamespace, setPrefix, setSymbol, toString`

    - ### Methods inherited from interface tv.amwa.maj.industry.WeakReferenceTarget

      `getWeakTargetReference`

- - ### Method Detail

    - #### createValueFromCharacter

          PropertyValue createValueFromCharacter(char character)

      Create a new property value of character type from the given single character.

      Parameters:
        `character` - Character to use to create a new property value.
      Returns:
        New property value with a character value matching the given character.
      See Also:
        `setCharacter(PropertyValue, char)`

    - #### getCharacter

          char getCharacter(PropertyValue characterProperty)
                     throws NullPointerException,
                            IllegalPropertyValueException

      Returns the character that is the value of the given character property value.

      Parameters:
        `characterProperty` - Property value containing the character to return.
      Returns:
        Value of the given property value.
      Throws:
        `NullPointerException` - The given property value is `null`.
        `IllegalPropertyValueException` - The given property value is not a character property value.
      See Also:
        `PropertyValue.getType()`

    - #### setCharacter

          void setCharacter(PropertyValue characterProperty,
                            char character)
                     throws NullPointerException,
                            IllegalPropertyValueException

      Sets the given character as the value of the given character property value.

      Parameters:
        `characterProperty` - Property value of character type to set the character for.
        `character` - Character to set as the value of the given property value.
      Throws:
        `NullPointerException` - The given character property value is `null`.
        `IllegalPropertyValueException` - The given property value is not a a character property value.
      See Also:
        `createValueFromCharacter(char)`

    - #### clone

          TypeDefinitionCharacter clone()

      Create a cloned copy of this character type definition.

      Specified by:
        `clone` in interface `MetaDefinition`
      Specified by:
        `clone` in interface `TypeDefinition`
      Returns:
        Cloned copy of this character type definition.

(c)2007-2016 Richard Cartwright, all rights reserved. Licensed under Apache 2 license and subject to the AMWA IPR policy.