public interface DynSequenceOperations extends DynAnyOperations
DynSequence objects support the manipulation of IDL sequences.
int get_length()
Returns the current length of the sequence.
void set_length(int len) throws InvalidValue
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:
InvalidValue
- if this is a bounded sequence and len is larger than the boundAny[] get_elements()
Returns the elements of the sequence.
void set_elements(Any[] value) throws TypeMismatch, InvalidValue
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.
TypeMismatch
- if value contains one or more elements whose TypeCode is not equivalent to the element TypeCode of the DynSequenceInvalidValue
- if the length of value exceeds the bound of a bounded sequenceDynAny[] get_elements_as_dyn_any()
Returns the DynAnys representing the elements of the sequence.
void set_elements_as_dyn_any(DynAny[] value) throws TypeMismatch, InvalidValue
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.
TypeMismatch
- if value contains one or more elements whose TypeCode is not equivalent to the element TypeCode of the DynSequenceInvalidValue
- if the length of value exceeds the bound of a bounded sequence
© 1993–2017, Oracle and/or its affiliates. All rights reserved.
Documentation extracted from Debian's OpenJDK Development Kit package.
Licensed under the GNU General Public License, version 2, with the Classpath Exception.
Various third party code in OpenJDK is licensed under different licenses (see Debian package).
Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.