FileDocCategorySizeDatePackage
DynSequenceOperations.javaAPI DocJava SE 6 API3737Tue Jun 10 01:33:24 BST 2008org.omg.DynamicAny

DynSequenceOperations

public interface DynSequenceOperations implements org.omg.DynamicAny.DynAnyOperations
DynSequence objects support the manipulation of IDL sequences.

Fields Summary
Constructors Summary
Methods Summary
public org.omg.CORBA.Any[]get_elements()
Returns the elements of the sequence.

public org.omg.DynamicAny.DynAny[]get_elements_as_dyn_any()
Returns the DynAnys representing the elements of the sequence.

public intget_length()
Returns the current length of the sequence.

public voidset_elements(org.omg.CORBA.Any[] value)
Sets the elements of a sequence. The length of the DynSequence is set to the length of value. The current position is set to zero if value has non-zero length and to -1 if value is a zero-length sequence.

exception
TypeMismatch if value contains one or more elements whose TypeCode is not equivalent to the element TypeCode of the DynSequence
exception
InvalidValue if the length of value exceeds the bound of a bounded sequence

public voidset_elements_as_dyn_any(org.omg.DynamicAny.DynAny[] value)
Sets the elements of a sequence using DynAnys. The length of the DynSequence is set to the length of value. The current position is set to zero if value has non-zero length and to -1 if value is a zero-length sequence.

exception
TypeMismatch if value contains one or more elements whose TypeCode is not equivalent to the element TypeCode of the DynSequence
exception
InvalidValue if the length of value exceeds the bound of a bounded sequence

public voidset_length(int len)
Sets the length of the sequence. Increasing the length of a sequence adds new elements at the tail without affecting the values of already existing elements. Newly added elements are default-initialized. Increasing the length of a sequence sets the current position to the first newly-added element if the previous current position was -1. Otherwise, if the previous current position was not -1, the current position is not affected. Decreasing the length of a sequence removes elements from the tail without affecting the value of those elements that remain. The new current position after decreasing the length of a sequence is determined as follows:
  • If the length of the sequence is set to zero, the current position is set to -1.
  • If the current position is -1 before decreasing the length, it remains at -1.
  • If the current position indicates a valid element and that element is not removed when the length is decreased, the current position remains unaffected.
  • If the current position indicates a valid element and that element is removed, the current position is set to -1.

exception
InvalidValue if this is a bounded sequence and len is larger than the bound