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 List<NamedValue>
     
    private static final int
     
    private ORB
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
    NVListImpl(ORB orb, int size)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    add(int flags)
    Creates a new NamedValue object initialized with the given flag and adds it to the end of this NVList object.
    add_item(String itemName, int flags)
    Creates a new NamedValue object initialized with the given name and flag, and adds it to the end of this NVList object.
    add_value(String itemName, Any val, int flags)
    Creates a new NamedValue object initialized with the given name, value, and flag, and adds it to the end of this NVList object.
    int
    Returns the number of NamedValue objects that have been added to this NVList object.
    item(int index)
    Retrieves the NamedValue object at the given index.
    void
    remove(int index)
    Removes the NamedValue object at the given index.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

  • Constructor Details

    • NVListImpl

      public NVListImpl(ORB orb)
    • NVListImpl

      public NVListImpl(ORB orb, int size)
  • Method Details

    • count

      public int count()
      Description copied from class: NVList
      Returns the number of NamedValue objects that have been added to this NVList object.
      Specified by:
      count in class NVList
      Returns:
      an int indicating the number of NamedValue objects in this NVList.
    • add

      public NamedValue add(int flags)
      Description copied from class: NVList
      Creates a new NamedValue object initialized with the given flag and adds it to the end of this NVList object. The flag can be any one of the argument passing modes: ARG_IN.value, ARG_OUT.value, or ARG_INOUT.value.
      Specified by:
      add in class NVList
      Parameters:
      flags - one of the argument mode flags
      Returns:
      the newly-created NamedValue object
    • add_item

      public NamedValue add_item(String itemName, int flags)
      Description copied from class: NVList
      Creates a new NamedValue object initialized with the given name and flag, and adds it to the end of this NVList object. The flag can be any one of the argument passing modes: ARG_IN.value, ARG_OUT.value, or ARG_INOUT.value.
      Specified by:
      add_item in class NVList
      Parameters:
      itemName - the name for the new NamedValue object
      flags - one of the argument mode flags
      Returns:
      the newly-created NamedValue object
    • add_value

      public NamedValue add_value(String itemName, Any val, int flags)
      Description copied from class: NVList
      Creates a new NamedValue object initialized with the given name, value, and flag, and adds it to the end of this NVList object.
      Specified by:
      add_value in class NVList
      Parameters:
      itemName - the name for the new NamedValue object
      val - an Any object containing the value for the new NamedValue object
      flags - one of the following argument passing modes: ARG_IN.value, ARG_OUT.value, or ARG_INOUT.value
      Returns:
      the newly created NamedValue object
    • item

      public NamedValue item(int index) throws Bounds
      Description copied from class: NVList
      Retrieves the NamedValue object at the given index.
      Specified by:
      item in class NVList
      Parameters:
      index - the index of the desired NamedValue 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 of NamedValue objects
    • remove

      public void remove(int index) throws Bounds
      Description copied from class: NVList
      Removes the NamedValue object at the given index. Note that the indices of all NamedValue objects following the one removed are shifted down by one.
      Specified by:
      remove in class NVList
      Parameters:
      index - the index of the NamedValue 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 of NamedValue objects in the list