FileDocCategorySizeDatePackage
NVListImpl.javaAPI DocJava SE 5 API2438Fri Aug 26 14:54:18 BST 2005com.sun.corba.se.impl.corba

NVListImpl

public class NVListImpl extends org.omg.CORBA.NVList

Fields Summary
private final int
INITIAL_CAPACITY
private final int
CAPACITY_INCREMENT
private Vector
_namedValues
private com.sun.corba.se.spi.orb.ORB
orb
Constructors Summary
public NVListImpl(com.sun.corba.se.spi.orb.ORB orb)


       
    
        // Note: This orb could be an instanceof ORBSingleton or ORB
        this.orb = orb;
        _namedValues = new Vector(INITIAL_CAPACITY, CAPACITY_INCREMENT);
    
public NVListImpl(com.sun.corba.se.spi.orb.ORB orb, int size)

        this.orb = orb;

	// Note: the size arg is only a hint of the size of the NVList.
        _namedValues = new Vector(size);
    
Methods Summary
public org.omg.CORBA.NamedValueadd(int flags)

        NamedValue tmpVal = new NamedValueImpl(orb, "", new AnyImpl(orb), flags);
        _namedValues.addElement(tmpVal);
        return tmpVal;
    
public org.omg.CORBA.NamedValueadd_item(java.lang.String itemName, int flags)

        NamedValue tmpVal = new NamedValueImpl(orb, itemName, new AnyImpl(orb), 
					       flags);
        _namedValues.addElement(tmpVal);
        return tmpVal;
    
public org.omg.CORBA.NamedValueadd_value(java.lang.String itemName, org.omg.CORBA.Any val, int flags)

        NamedValue tmpVal = new NamedValueImpl(orb, itemName, val, flags);
        _namedValues.addElement(tmpVal);
        return tmpVal;
    
public intcount()

        return _namedValues.size();
    
public org.omg.CORBA.NamedValueitem(int index)

        try {
            return (NamedValue) _namedValues.elementAt(index);
        } catch (ArrayIndexOutOfBoundsException e) {
            throw new Bounds();
        }
    
public voidremove(int index)

        try {
            _namedValues.removeElementAt(index);
        } catch (ArrayIndexOutOfBoundsException e) {
            throw new Bounds();
        }