edu.iris.Fissures.seed.container
Interface ObjectContainer

All Known Implementing Classes:
SeedObjectContainer, SeedVolumeMMAPContainer

public interface ObjectContainer

Generic Builder Container Interface Container facility that organizes the objects by volume number and/or object category number. This class is typically called by a Concrete Builder class. Recommended storage is through the use of HashMaps, although other techniques may be used as well. This class will perform all sorting and lookup functions internally. Each object should be tagged with a unique lookup integer, which is indicated by refNum in the interface specification below.

Version:
8/7/2003
Author:
Robert Casey, IRIS DMC

Method Summary
 void add(java.lang.Object addThis)
          Add provided object to the container
 java.lang.Object get(int refNum)
          Find and return the object matching to refNum
 java.lang.Object getNext()
          Get next object from established iterator list.
 int iterate()
           
 int iterate(int catNum)
           
 int iterate(int volNum, int catNum)
          Locate all objects belonging to volume volNum and of category catNum.
 boolean locate(int refNum)
          Locate the object matching to refNum and return true if found
 java.lang.Object remove(int refNum)
          Remove the object matching to refNum
 

Method Detail

add

void add(java.lang.Object addThis)
         throws java.lang.Exception
Add provided object to the container

Throws:
java.lang.Exception

get

java.lang.Object get(int refNum)
                     throws ContainerException
Find and return the object matching to refNum

Throws:
ContainerException

remove

java.lang.Object remove(int refNum)
                        throws ContainerException
Remove the object matching to refNum

Throws:
ContainerException

locate

boolean locate(int refNum)
               throws ContainerException
Locate the object matching to refNum and return true if found

Throws:
ContainerException

iterate

int iterate(int volNum,
            int catNum)
Locate all objects belonging to volume volNum and of category catNum. Initialize an iteration list that can be traversed by getNext(). Return the number of objects in the iterator list.


iterate

int iterate(int catNum)

iterate

int iterate()

getNext

java.lang.Object getNext()
                         throws ContainerException
Get next object from established iterator list. If iterator has no objects, then return null.

Throws:
ContainerException