|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--quicktime.app.spaces.Protocol
A Protocol is a collection of classes that are used to test an object against. The passProtocol (Object o) method uses the Class.instanceOf method on each of the classes in its collection. If the incoming object is not an instance of any of the classes in the Protocol then the passProtocol method returns false. If the incoming object is then it returns true.
For DynamicCollections an application can dynamically assign or add classes to a Protocol to tighten the membership requirements of its collection. When an object is added to a dynamic collection the dynamic collection will first test the object against its Protocol's passProtocol method. Only if it passes this test is the object allowed to be added to the Collection. This test is encapsulated in the DynamicCollection's isAppropriate method.
DynamicCollection| Constructor Summary | |
Protocol(java.lang.Class defaultProtocol)
Deprecated. since QTJava 6.1 |
|
Protocol(java.lang.Class[] defaultProtocols)
Deprecated. since QTJava 6.1 |
|
| Method Summary | |
boolean |
addMember(java.lang.Object member)
Deprecated. since QTJava 6.1 |
java.util.Enumeration |
defaultProtocol()
Deprecated. since QTJava 6.1 |
boolean |
hasMember(java.lang.Object object)
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 |
boolean |
passProtocol(java.lang.Object object)
Deprecated. since QTJava 6.1 |
void |
removeMember(java.lang.Object member)
Deprecated. since QTJava 6.1 |
int |
size()
Deprecated. since QTJava 6.1 |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public Protocol(java.lang.Class[] defaultProtocols)
public Protocol(java.lang.Class defaultProtocol)
| Method Detail |
public java.util.Enumeration defaultProtocol()
public java.util.Enumeration members()
members in interface Collectionpublic boolean isEmpty()
isEmpty in interface Collectionpublic boolean hasMember(java.lang.Object object)
hasMember in interface Collectionobject - the object to test for membership
public int size()
size in interface Collectionpublic boolean addMember(java.lang.Object member)
addMember in interface Collectionmember - the object that should be added as a member to the collection
public void removeMember(java.lang.Object member)
removeMember in interface Collectionmember - the object to remove from the collectionpublic boolean isAppropriate(java.lang.Object object)
isAppropriate in interface Collectionobject - the object to test
DynamicCollection,
Protocolpublic boolean passProtocol(java.lang.Object object)
object - the Object to test
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||