Class BasePVUnionArray

    • Constructor Detail

      • BasePVUnionArray

        public BasePVUnionArray​(UnionArray unionArray)
        Constructor.
        Parameters:
        unionArray - The Introspection interface.
    • Method Detail

      • get

        public int get​(int offset,
                       int len,
                       UnionArrayData data)
        Description copied from interface: PVUnionArray
        Get values from a PVUnionArray and put them into PVUnion[]to.
        Specified by:
        get in interface PVUnionArray
        Parameters:
        offset - the offset to the first element to get
        len - the maximum number of elements to transfer
        data - the class containing the data and an offset into the data. Get sets these values. The caller must do the actual data transfer.
        Returns:
        the number of elements that can be transfered. This is always less than or equal to length. If the value is less then length then get should be called again. If the return value is greater than 0 then data.data is a reference to the array and data.offset is the offset into the array.
      • put

        public int put​(int offset,
                       int len,
                       PVUnion[] from,
                       int fromOffset)
        Description copied from interface: PVUnionArray
        Put values into a PVUnionArray from PVUnion[]from
        Specified by:
        put in interface PVUnionArray
        Parameters:
        offset - the offset to the first element to put
        len - the maximum number of elements to transfer
        from - the array from which to get the data.
        fromOffset - the offset into from
        Returns:
        the number of elements transfered. This is always less than or equal to length. If the value is less than the length then put should be called again.
      • shareData

        public void shareData​(PVUnion[] from)
        Description copied from interface: PVUnionArray
        Share the data from caller. The capacity and length are taken from the array and this array is made immutable. This should only be used to share immutable data.
        Specified by:
        shareData in interface PVUnionArray
        Parameters:
        from - the data to share
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object