Class DynSequenceImpl

All Implemented Interfaces:
Serializable, Object, IDLEntity, DynAny, DynAnyOperations, DynSequence, DynSequenceOperations

public class DynSequenceImpl extends DynAnyCollectionImpl implements DynSequence
See Also:
  • Field Details

  • Constructor Details

    • DynSequenceImpl

      protected DynSequenceImpl(ORB orb, Any any, boolean copyValue)
    • DynSequenceImpl

      protected DynSequenceImpl(ORB orb, TypeCode typeCode)
  • Method Details

    • initializeComponentsFromAny

      protected boolean initializeComponentsFromAny()
      Specified by:
      initializeComponentsFromAny in class DynAnyConstructedImpl
    • initializeComponentsFromTypeCode

      protected boolean initializeComponentsFromTypeCode()
      Specified by:
      initializeComponentsFromTypeCode in class DynAnyConstructedImpl
    • initializeAnyFromComponents

      protected boolean initializeAnyFromComponents()
      Overrides:
      initializeAnyFromComponents in class DynAnyConstructedImpl
    • get_length

      public int get_length()
      Description copied from interface: DynSequenceOperations
      Returns the current length of the sequence.
      Specified by:
      get_length in interface DynSequenceOperations
      Returns:
      the sequence length
    • set_length

      public void set_length(int len) throws InvalidValue
      Description copied from interface: DynSequenceOperations
      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.
      Specified by:
      set_length in interface DynSequenceOperations
      Parameters:
      len - the new length of the sequence
      Throws:
      InvalidValue - if this is a bounded sequence and len is larger than the bound
    • checkValue

      protected void checkValue(Object[] value) throws InvalidValue
      Specified by:
      checkValue in class DynAnyCollectionImpl
      Throws:
      InvalidValue