|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface CollectionHandler
Collection handler for adding/listing elements of a collection. A collection field will use this handler to add elements when it's value is set, and to enumerate then when it's value is retrieved. A collection handler is instantiated only once, must be thread safe and not use any synchronization.
| Method Summary | |
|---|---|
Object |
add(Object collection,
Object object)
Add an object to the collection. |
Object |
clear(Object collection)
Clears the collection of any objects. |
Enumeration |
elements(Object collection)
Returns an enumeration of all the elements in the collection. |
int |
size(Object collection)
Returns the number of elements in the collection. |
| Method Detail |
|---|
Object add(Object collection,
Object object)
throws ClassCastException
collection - The collection, null if no collection has
been created yetobject - The object to add to the collection
ClassCastException - The collection handler does not
support collections of this type
Enumeration elements(Object collection)
throws ClassCastException
collection - The collection
ClassCastException - The collection handler does not
support collections of this type
int size(Object collection)
throws ClassCastException
collection - The collection
ClassCastException - The collection handler does not
support collections of this type
Object clear(Object collection)
throws ClassCastException
collection - The collection, null if no collection has
been created yet
ClassCastException - The collection handler does not
support collections of this type
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||