Constructor and Description |
---|
DoubleArrayColumn(double[] vals) |
Modifier and Type | Method and Description |
---|---|
<T> T |
as(Class<? extends T> clazz)
Asks the Column to return itself as a concrete implementation of a specific interface.
|
ColumnAccessor |
toAccessor()
Returns the column as a
ColumnAccessor . |
@Nonnull public ColumnAccessor toAccessor()
Column
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.toAccessor
in interface Column
ColumnAccessor
representation of the column, this should never return null.@Nullable public <T> T as(Class<? extends T> clazz)
Column
as
in interface Column
T
- The interface that the calling code wants a concrete implementation ofclazz
- A class object representing the interface that the calling code wants a concrete implementation ofCopyright © 2011–2023 The Apache Software Foundation. All rights reserved.