GridLab
Grid Application Toolkit

A simple API for Grid Applications
GAT

Menu



Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members  

AdaptorList.java

Go to the documentation of this file.
00001 /*
00002  * Created on May 11, 2004
00003  */
00004 package org.gridlab.gat.engine;
00005 
00006 import java.util.ArrayList;
00007 
00008 /**
00009  * @author rob
00010  */
00011 class AdaptorList {
00012 
00013     String cpi;
00014 
00015     /** The fully qualified name of the class the adaptors in this set. */
00016     Class cpiClass;
00017 
00018     /** The api class all adaptors in this set implement. */
00019     ArrayList adaptors;
00020 
00021     /** A list of the adaptors. The type of the elements is "Adaptor" */
00022 
00023     /**
00024      * @param cpi
00025      *            The fully qualified name of the class the adaptors in this
00026      *            set.
00027      * @param cpiClass
00028      *            The api class all adaptors in this set implement.
00029      */
00030     AdaptorList(Class cpiClass) {
00031         this.cpi = cpiClass.getName();
00032         this.cpiClass = cpiClass;
00033         adaptors = new ArrayList();
00034     }
00035 
00036     void addAdaptor(Adaptor a) {
00037         adaptors.add(a);
00038     }
00039 
00040     int size() {
00041         return adaptors.size();
00042     }
00043 
00044     Adaptor get(int pos) {
00045         return (Adaptor) adaptors.get(pos);
00046     }
00047 }