Media Authoring
with Java API

tv.amwa.maj.meta
Interface MAJCommon

All Known Implementing Classes:
ClassDefinition, MetaDefinition, PropertyDefinition, TypeDefinition, TypeDefinitionCharacter, TypeDefinitionEnumeration, TypeDefinitionExtendibleEnumeration, TypeDefinitionFixedArray, TypeDefinitionIndirect, TypeDefinitionInteger, TypeDefinitionObjectReference, TypeDefinitionObjectReference.TypeDefinitionObjectReferenceUnresolved, TypeDefinitionOpaque, TypeDefinitionRecord, TypeDefinitionRename, TypeDefinitionSet, TypeDefinitionStream, TypeDefinitionString, TypeDefinitionStrongObjectReference, TypeDefinitionVariableArray, TypeDefinitionWeakObjectReference

public interface MAJCommon

Specifies MAJ API-specific common methods implemented by all classes in the meta package. These methods are the common methods from Object, such as to string and hash code, that the MAJ API requires are implemented for all meta classes. Meta classes do not have to be cloneable as, in theory at least, there should not be more than one meta-description of the same thing!

All classes that implement this interface also provide the following services:

  1. A public static castFromInterface() method that takes any interface-compatible implementation of the class and returns a MAJ API-implemented version.
  2. A public setPropertiesFromInterface() method that takes any interface-compatible implementation of the class and uses its property values to set all the values of this class.

Note that it is not possible to enforce the existence of the methods described above using Java interfaces. These are an implementation pattern that is specific to the MAJ API.

Author:
Richard Cartwright
See Also:
MetaDefinition.castFromInterface(tv.amwa.maj.iface.MetaDefinition), TypeDefinitionInteger.setPropertiesFromInterface(tv.amwa.maj.iface.TypeDefinitionInteger)

Method Summary
 boolean equals(Object o)
          Tests to see if the given object is equal to this embeddable value.
 int hashCode()
          Returns a hash code value for this embeddable object.
 String toString()
          Create and return a human-readable string representation of this embeddable value.
 

Method Detail

toString

String toString()

Create and return a human-readable string representation of this embeddable value.

Overrides:
toString in class Object
Returns:
String representation of this embeddable value.
See Also:
Object.toString()

hashCode

int hashCode()

Returns a hash code value for this embeddable object.

Overrides:
hashCode in class Object
Returns:
Hash code value for this embeddable object.
See Also:
Object.hashCode()

equals

boolean equals(Object o)

Tests to see if the given object is equal to this embeddable value. To be equal, the given value must be not null, share the same interface to its value and each of the properties of the value must each be equal.

Overrides:
equals in class Object
Parameters:
o - Object to test for equality with.
Returns:
Is the given object equals to this value?
See Also:
Object.equals(Object)

Media Authoring
with Java API

(c) 2007-2008 Richard Cartwright, all rights reserved. Subject to the terms of the AAF SDK Public Source License.