/*
 * Created on Feb 1, 2005
 *
 * TODO To change the template for this generated file go to
 * Window - Preferences - Java - Code Style - Code Templates
 */
package run;

import java.util.Vector;
import jp.lang.RemoteObject;
import jp.lang.RMICompatibility;
import uka.karmi.rmi.RemoteException;
import uka.karmi.rmi.server.ReplicatedObject;

/**
 * @author pc58410
 *
 * TODO To change the template for this generated type comment go to
 * Window - Preferences - Java - Code Style - Code Templates
 */
public class RplVector extends ReplicatedObject {
	private Vector v;
	
    // Constructor
    public RplVector(RemoteObject[] cluster_nodes)
        throws RemoteException
    {
        super(RMICompatibility.getStubs(cluster_nodes));
		v = new Vector();
    }

    

	/**
	 * @param number_of_elements
	 */
	public RplVector(int number_of_elements) throws RemoteException {
		// Dummy for conventional version
		super(null);
		v = new Vector(number_of_elements);
		// TODO Auto-generated constructor stub
	}


	/**
	 * @param arg0
	 * @return
	 */
	public boolean add(Object arg0) {
		return v.add(arg0);
	}
	/**
	 * @param arg0
	 * @return
	 */
	public Object elementAt(int arg0) {
		return v.elementAt(arg0);
	}
	/**
	 * @return
	 */
	public Object firstElement() {
		return v.firstElement();
	}
	/**
	 * @param arg0
	 * @return
	 */
	public int indexOf(Object arg0) {
		return v.indexOf(arg0);
	}
	/**
	 * @return
	 */
	public Object lastElement() {
		return v.lastElement();
	}
	/**
	 * @param arg0
	 * @return
	 */
	public boolean remove(Object arg0) {
		return v.remove(arg0);
	}
	/**
	 * @param arg0
	 */
	public void removeElementAt(int arg0) {
		v.removeElementAt(arg0);
	}
	/**
	 * @return
	 */
	public int size() {
		return v.size();
	}
	
	/**
	 * @param arg0
	 */
	public void addElement(Object arg0) {
		v.addElement(arg0);
	}
	
	/**
	 * @param arg0
	 * @param arg1
	 */
	public void insertElementAt(Object arg0, int arg1) {
		v.insertElementAt(arg0, arg1);
	}

}
