Class NativeSequence


  • public class NativeSequence
    extends java.lang.Object
    Native Java implementation of a sequence field value
    • Field Detail

      • EMPTY_BOOLEAN_SEQUENCE

        public static NativeSequence EMPTY_BOOLEAN_SEQUENCE
      • EMPTY_BYTE_SEQUENCE

        public static NativeSequence EMPTY_BYTE_SEQUENCE
      • EMPTY_SHORT_SEQUENCE

        public static NativeSequence EMPTY_SHORT_SEQUENCE
      • EMPTY_LONG_SEQUENCE

        public static NativeSequence EMPTY_LONG_SEQUENCE
      • EMPTY_FLOAT_SEQUENCE

        public static NativeSequence EMPTY_FLOAT_SEQUENCE
      • EMPTY_DOUBLE_SEQUENCE

        public static NativeSequence EMPTY_DOUBLE_SEQUENCE
      • EMPTY_DATE_SEQUENCE

        public static NativeSequence EMPTY_DATE_SEQUENCE
      • EMPTY_CHAR_SEQUENCE

        public static NativeSequence EMPTY_CHAR_SEQUENCE
      • EMPTY_UNICODE_CHAR_SEQUENCE

        public static NativeSequence EMPTY_UNICODE_CHAR_SEQUENCE
      • EMPTY_STRING_SEQUENCE

        public static NativeSequence EMPTY_STRING_SEQUENCE
      • EMPTY_UNICODE_STRING_SEQUENCE

        public static NativeSequence EMPTY_UNICODE_STRING_SEQUENCE
      • EMPTY_STRUCT_SEQUENCE

        public static NativeSequence EMPTY_STRUCT_SEQUENCE
      • EMPTY_SEQUENCE_SEQUENCE

        public static NativeSequence EMPTY_SEQUENCE_SEQUENCE
    • Constructor Detail

      • NativeSequence

        public NativeSequence​(short type,
                              java.lang.String fieldName)
        Constructs a zero length sequence of the specified element type
      • NativeSequence

        public NativeSequence​(short type,
                              int length,
                              java.lang.String fieldName)
        Constructs a sequence field of the specified element type and length
        Parameters:
        type - - sequence element type
        length - - number of elements
    • Method Detail

      • elementExists

        public boolean elementExists​(int index)
                              throws BrokerException
        Returns true if the element at the specified index exists.
        Parameters:
        index - the index of the element to test
        Throws:
        BrokerException
      • ensureLength

        public void ensureLength​(int length)
                          throws BrokerException
        Ensures that the length of the sequence is greater than or equal to the specified length.
        Parameters:
        length - - the new sequence length
        Throws:
        BrokerException
      • getElements

        public java.lang.Object getElements​(int offset,
                                            int count)
                                     throws BrokerException
        Gets multiple elements of the sequence
        Parameters:
        offset - - starting at zero based sequence index
        count - - the number of elements to get
        Returns:
        array of sequence elements
        Throws:
        java.lang.IndexOutOfBoundsException
        BrokerException
      • getElementClass

        public java.lang.Class getElementClass()
        Gets the class for element type of the sequence
        Returns:
        Class of sequence
      • getElementType

        public short getElementType()
        Gets the element type of the sequence
        Returns:
        type of sequence
      • getLength

        public int getLength()
        Gets the length of the sequence
        Returns:
        length of sequence
      • setElement

        public void setElement​(int index,
                               java.lang.Object value)
                        throws BrokerException
        Sets an element of the sequence, growing the sequence if necessary
        Parameters:
        index - - zero based sequence index
        value - - element value
        Throws:
        BrokerException
      • setElements

        public void setElements​(int srcOffset,
                                int destOffset,
                                int count,
                                java.lang.Object src)
                         throws BrokerException
        Sets multiple elements of the sequence, growing the sequence if necessary
        Parameters:
        srcOffset - - zero-based index of first src element
        destOffset - - zero-based index of first dest element
        count - - the number of elements to set
        src - - the source elements
        Throws:
        BrokerException
      • setLength

        public void setLength​(int newLength)
                       throws BrokerException
        Sets the length of the sequence.
        Parameters:
        newLength - - the new length
        Throws:
        BrokerException
      • getEmptySequence

        public static NativeSequence getEmptySequence​(short type)