Class ObjectArrayColumn

  • All Implemented Interfaces:
    Column

    public class ObjectArrayColumn
    extends Object
    implements Column
    • Method Detail

      • getObjects

        public Object[] getObjects()
        Gets the underlying object array. This method is exposed on the concrete class explicitly to allow for mutation. This class does absolutely nothing to ensure that said mutation of the array is valid. It is up to the caller that is choosing to do this mutation to make sure that it is safe.
        Returns:
        the object array backing this column
      • toAccessor

        @Nonnull
        public ColumnAccessor toAccessor()
        Description copied from interface: Column
        Returns the column as a ColumnAccessor. Semantically, this would be equivalent to calling Column.as(ColumnAccessor.class). However, being able to implement this interface is part of the explicit contract of implementing this interface, so instead of relying on Column.as(java.lang.Class<? extends T>) which allows for returning null, we define a top-level method that should never return null.
        Specified by:
        toAccessor in interface Column
        Returns:
        a ColumnAccessor representation of the column, this should never return null.
      • as

        @Nullable
        public <T> T as​(Class<? extends T> clazz)
        Description copied from interface: Column
        Asks the Column to return itself as a concrete implementation of a specific interface. The interface asked for will tend to be a semantically-meaningful interface. This method allows the calling code to interrogate the Column object about whether it can offer a meaningful optimization of the semantic interface. If a Column cannot do anything specifically optimal for the interface requested, it should return null instead of trying to come up with its own default implementation.
        Specified by:
        as in interface Column
        Type Parameters:
        T - The interface that the calling code wants a concrete implementation of
        Parameters:
        clazz - A class object representing the interface that the calling code wants a concrete implementation of
        Returns:
        A concrete implementation of the interface, or null if there is no meaningful optimization to be had through a local implementation of the interface.