Class CollectionManager

java.lang.Object
  |
  +--CollectionManager

public class CollectionManager
extends java.lang.Object

This class is a very simple demo of using the Collection classes.


Constructor Summary
CollectionManager()
           
 
Method Summary
 void fillCollection(java.util.Collection c)
          Add several strings to a Collection.
 void printCollection(java.util.Collection c)
          Print the contents of the Collection.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CollectionManager

public CollectionManager()
Method Detail

fillCollection

public void fillCollection(java.util.Collection c)
Add several strings to a Collection. The strings are added in reverse alphabetical order and there are duplicates.

Parameters:
c - the Collection to work with

printCollection

public void printCollection(java.util.Collection c)
Print the contents of the Collection. The Strings are retrieved in whatever order the Collection iterator provides them, which depends on the type of Collection. The duplicates may have been ignored, depending on the type of Collection.

Parameters:
c - the Collection to work with