1. package org.omg.DynamicAny;
  2. /**
  3. * org/omg/DynamicAny/DynSequenceOperations.java .
  4. * Generated by the IDL-to-Java compiler (portable), version "3.2"
  5. * from ../../../../src/share/classes/org/omg/DynamicAny/DynamicAny.idl
  6. * Wednesday, September 15, 2004 10:28:49 AM GMT
  7. */
  8. /**
  9. * DynSequence objects support the manipulation of IDL sequences.
  10. */
  11. public interface DynSequenceOperations extends org.omg.DynamicAny.DynAnyOperations
  12. {
  13. /**
  14. * Returns the current length of the sequence.
  15. */
  16. int get_length ();
  17. /**
  18. * Sets the length of the sequence.
  19. * Increasing the length of a sequence adds new elements at the tail without affecting the values
  20. * of already existing elements. Newly added elements are default-initialized.
  21. * Increasing the length of a sequence sets the current position to the first newly-added element
  22. * if the previous current position was -1. Otherwise, if the previous current position was not -1,
  23. * the current position is not affected.
  24. * Decreasing the length of a sequence removes elements from the tail without affecting the value
  25. * of those elements that remain. The new current position after decreasing the length of a sequence
  26. * is determined as follows:
  27. * <UL>
  28. * <LI>If the length of the sequence is set to zero, the current position is set to -1.
  29. * <LI>If the current position is -1 before decreasing the length, it remains at -1.
  30. * <LI>If the current position indicates a valid element and that element is not removed when the length
  31. * is decreased, the current position remains unaffected.
  32. * <LI>If the current position indicates a valid element and that element is removed,
  33. * the current position is set to -1.
  34. * </UL>
  35. *
  36. * @exception InvalidValue if this is a bounded sequence and len is larger than the bound
  37. */
  38. void set_length (int len) throws org.omg.DynamicAny.DynAnyPackage.InvalidValue;
  39. /**
  40. * Returns the elements of the sequence.
  41. */
  42. org.omg.CORBA.Any[] get_elements ();
  43. /**
  44. * Sets the elements of a sequence.
  45. * The length of the DynSequence is set to the length of value. The current position is set to zero
  46. * if value has non-zero length and to -1 if value is a zero-length sequence.
  47. *
  48. * @exception TypeMismatch if value contains one or more elements whose TypeCode is not equivalent
  49. * to the element TypeCode of the DynSequence
  50. * @exception InvalidValue if the length of value exceeds the bound of a bounded sequence
  51. */
  52. void set_elements (org.omg.CORBA.Any[] value) throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch, org.omg.DynamicAny.DynAnyPackage.InvalidValue;
  53. /**
  54. * Returns the DynAnys representing the elements of the sequence.
  55. */
  56. org.omg.DynamicAny.DynAny[] get_elements_as_dyn_any ();
  57. /**
  58. * Sets the elements of a sequence using DynAnys.
  59. * The length of the DynSequence is set to the length of value. The current position is set to zero
  60. * if value has non-zero length and to -1 if value is a zero-length sequence.
  61. *
  62. * @exception TypeMismatch if value contains one or more elements whose TypeCode is not equivalent
  63. * to the element TypeCode of the DynSequence
  64. * @exception InvalidValue if the length of value exceeds the bound of a bounded sequence
  65. */
  66. void set_elements_as_dyn_any (org.omg.DynamicAny.DynAny[] value) throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch, org.omg.DynamicAny.DynAnyPackage.InvalidValue;
  67. } // interface DynSequenceOperations