quicktime.app.spaces
Interface Collection

All Known Subinterfaces:
CollectionController, DynamicCollection, QTDisplaySpace, Space
All Known Implementing Classes:
GroupDrawable, ImageDataSequence, MouseController, Protocol, QTMouseTargetController, SimpleSpace, SWCompositor, TickleList

Deprecated. since QTJava 6.1

public interface Collection

This interface provide an uniform means of dealing with a collection of Objects in QTJava. Particular implementations of this interface provide both their own storage mechanism and semantics about the default position and characteristics of the addMember method.

The isAppropriate method returns true if the object argument conforms to the type of object that the Collection is a collector of. The addMember implementation will call isAppropriate and returns true if the object is an appropriate member (and is therefore added to the collection).

The individual collection classes explain the customisations and restrictions on membership they enforce.

The type of object that a collection contains is statically determined by the isAppropriate () method. The DynamicCollection extension of Collection provides a mechanism for dynamically customising the membership requirments for individual collections.

See Also:
DynamicCollection

Method Summary
 boolean addMember(java.lang.Object member)
          Deprecated. since QTJava 6.1
 boolean hasMember(java.lang.Object member)
          Deprecated. since QTJava 6.1
 boolean isAppropriate(java.lang.Object object)
          Deprecated. since QTJava 6.1
 boolean isEmpty()
          Deprecated. since QTJava 6.1
 java.util.Enumeration members()
          Deprecated. since QTJava 6.1
 void removeMember(java.lang.Object member)
          Deprecated. since QTJava 6.1
 int size()
          Deprecated. since QTJava 6.1
 

Method Detail

addMember

public boolean addMember(java.lang.Object member)
                  throws QTException
Deprecated. since QTJava 6.1

Adds an object to the collection. Returns true if the object is appropriate member of the collection (and thus added) and false if not.

Parameters:
member - the object that should be added as a member to the collection
Returns:
a boolean.
QTException

hasMember

public boolean hasMember(java.lang.Object member)
Deprecated. since QTJava 6.1

Returns true if the provided object is a member of the collection.

Parameters:
member - the object to test for membership
Returns:
a boolean

isAppropriate

public boolean isAppropriate(java.lang.Object object)
Deprecated. since QTJava 6.1

Returns true if the provided object is an appropriate candidate for membership in a collection. The provided QTJava collections use this method to ensure a minimal requirement of Class or Interface instanceof tests to ensure the type of object that can be added to a collection. Some collections can have a protocol that allows an application to further refine and tighten the type of object that is allowed within an individual collection.

Parameters:
object - the object to test
Returns:
true if the supplied object is appropriate for this collection, or false if not
See Also:
DynamicCollection, Protocol

isEmpty

public boolean isEmpty()
Deprecated. since QTJava 6.1

Returns true if the collection contains no members, or false if it has one or more members.

Returns:
a boolean

members

public java.util.Enumeration members()
Deprecated. since QTJava 6.1

Returns an enumeration to iterate over the current members of a collection.

Returns:
an enumeration

removeMember

public void removeMember(java.lang.Object member)
                  throws QTException
Deprecated. since QTJava 6.1

If the object is a member of the collection it is removed.

Parameters:
member - the object to remove from the collection
QTException

size

public int size()
Deprecated. since QTJava 6.1

Returns the number of members in the collection, ie. the collection's size.

Returns:
the size of the collection.