Class HashtableCollectionHandler<T>
java.lang.Object
org.exolab.castor.mapping.loader.collection.handler.HashtableCollectionHandler<T>
- All Implemented Interfaces:
CollectionHandler<T>
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionAdd an object to the collection.Clears the collection of any objects.Returns an enumeration of all the elements in the collection.intReturns the number of elements in the collection.toString()
-
Constructor Details
-
HashtableCollectionHandler
public HashtableCollectionHandler()
-
-
Method Details
-
add
Description copied from interface:CollectionHandlerAdd an object to the collection. A collection may not allow the same object to be added more than once. The collection is provided as a parameter and is returned as the return value if the returned collection is a different object. That way the handler can create a new collection or change the collection as necessary (e.g. when resizing an array).- Specified by:
addin interfaceCollectionHandler<T>- Parameters:
collection- The collection, null if no collection has been created yetobject- The object to add to the collection- Returns:
- The collection with the new object if a different instance than the collection parameter, null otherwise
-
elements
Description copied from interface:CollectionHandlerReturns an enumeration of all the elements in the collection.- Specified by:
elementsin interfaceCollectionHandler<T>- Parameters:
collection- The collection- Returns:
- An enumeration of all the elements in the collection
-
size
Description copied from interface:CollectionHandlerReturns the number of elements in the collection.- Specified by:
sizein interfaceCollectionHandler<T>- Parameters:
collection- The collection- Returns:
- Number of elements in the collection
-
clear
Description copied from interface:CollectionHandlerClears the collection of any objects. The collection is provided as a parameter and is returned as the return value if the returned collection is a different object. That way the handler can create a new collection or change the collection as necessary (e.g. when resizing an array).- Specified by:
clearin interfaceCollectionHandler<T>- Parameters:
collection- The collection, null if no collection has been created yet- Returns:
- The empty collection if a different instance than the collection parameter, null otherwise
-
toString
-