Package com.sun.corba.ee.impl.corba
Class NVListImpl
- java.lang.Object
-
- org.omg.CORBA.NVList
-
- com.sun.corba.ee.impl.corba.NVListImpl
-
public class NVListImpl extends NVList
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.List<NamedValue>
_namedValues
private static int
INITIAL_CAPACITY
private ORB
orb
-
Constructor Summary
Constructors Constructor Description NVListImpl(ORB orb)
NVListImpl(ORB orb, int size)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description NamedValue
add(int flags)
Creates a newNamedValue
object initialized with the given flag and adds it to the end of thisNVList
object.NamedValue
add_item(java.lang.String itemName, int flags)
Creates a newNamedValue
object initialized with the given name and flag, and adds it to the end of thisNVList
object.NamedValue
add_value(java.lang.String itemName, Any val, int flags)
Creates a newNamedValue
object initialized with the given name, value, and flag, and adds it to the end of thisNVList
object.int
count()
Returns the number ofNamedValue
objects that have been added to thisNVList
object.NamedValue
item(int index)
Retrieves theNamedValue
object at the given index.void
remove(int index)
Removes theNamedValue
object at the given index.
-
-
-
Field Detail
-
INITIAL_CAPACITY
private static final int INITIAL_CAPACITY
- See Also:
- Constant Field Values
-
_namedValues
private java.util.List<NamedValue> _namedValues
-
orb
private ORB orb
-
-
Method Detail
-
count
public int count()
Description copied from class:NVList
Returns the number ofNamedValue
objects that have been added to thisNVList
object.
-
add
public NamedValue add(int flags)
Description copied from class:NVList
Creates a newNamedValue
object initialized with the given flag and adds it to the end of thisNVList
object. The flag can be any one of the argument passing modes:ARG_IN.value
,ARG_OUT.value
, orARG_INOUT.value
.
-
add_item
public NamedValue add_item(java.lang.String itemName, int flags)
Description copied from class:NVList
Creates a newNamedValue
object initialized with the given name and flag, and adds it to the end of thisNVList
object. The flag can be any one of the argument passing modes:ARG_IN.value
,ARG_OUT.value
, orARG_INOUT.value
.
-
add_value
public NamedValue add_value(java.lang.String itemName, Any val, int flags)
Description copied from class:NVList
Creates a newNamedValue
object initialized with the given name, value, and flag, and adds it to the end of thisNVList
object.- Specified by:
add_value
in classNVList
- Parameters:
itemName
- the name for the newNamedValue
objectval
- anAny
object containing the value for the newNamedValue
objectflags
- one of the following argument passing modes:ARG_IN.value
,ARG_OUT.value
, orARG_INOUT.value
- Returns:
- the newly created
NamedValue
object
-
item
public NamedValue item(int index) throws Bounds
Description copied from class:NVList
Retrieves theNamedValue
object at the given index.- Specified by:
item
in classNVList
- Parameters:
index
- the index of the desiredNamedValue
object, which must be between zero and the length of the list minus one, inclusive. The first item is at index zero.- Returns:
- the
NamedValue
object at the given index - Throws:
Bounds
- if the index is greater than or equal to number ofNamedValue
objects
-
remove
public void remove(int index) throws Bounds
Description copied from class:NVList
Removes theNamedValue
object at the given index. Note that the indices of allNamedValue
objects following the one removed are shifted down by one.- Specified by:
remove
in classNVList
- Parameters:
index
- the index of theNamedValue
object to be removed, which must be between zero and the length of the list minus one, inclusive. The first item is at index zero.- Throws:
Bounds
- if the index is greater than or equal to number ofNamedValue
objects in the list
-
-