Class AbstractType.MultiArray.Sized.Allocated<TA,TI>

java.lang.Object
org.postgresql.pljava.adt.spi.AbstractType.MultiArray.Sized.Allocated<TA,TI>
Type Parameters:
TA - the overall Java type of the whole array, which can be retrieved with array()
TI - the type of the arrays at the final level (one-dimensional arrays of the component type) that can be iterated, in order, to be populated or read out. <TI> is always an array type, but can be a reference array or any primitive array type, and therefore not as convenient as it might be, because the least upper bound of those types is Object.
All Implemented Interfaces:
Iterable<TI>
Enclosing class:
AbstractType.MultiArray.Sized

public class AbstractType.MultiArray.Sized.Allocated<TA,TI> extends Object implements Iterable<TI>
Wraps an existing instance of the multiarray type in question.
  • Method Details

    • array

      public TA array()
      Returns the resulting array.
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • iterator

      public Iterator<TI> iterator()
      Returns an Iterator over the array(s) at the bottom level of this multiarray, the ones that are one-dimensional arrays of the component type.

      They are returned in order, so that a simple loop to copy the component values into or out of each array in turn will amount to a row-major traversal (same as PostgreSQL's storage order) of the whole array.

      Specified by:
      iterator in interface Iterable<TA>