public abstract class AbstractColumn<C extends Column<T>,T> extends Object implements Column<T>
Column
interfaceModifier and Type | Field and Description |
---|---|
static int |
DEFAULT_ARRAY_SIZE |
Constructor and Description |
---|
AbstractColumn(ColumnType type,
String name) |
Modifier and Type | Method and Description |
---|---|
StringColumn |
asStringColumn()
Returns a StringColumn consisting of the (unformatted) String representation of this column
values
|
abstract Column<T> |
emptyCopy()
Returns a copy of the receiver with no data.
|
C |
filter(Predicate<? super T> test)
Returns a new Column of the same type with only those rows satisfying the predicate
|
C |
first(int numRows) |
C |
inRange(int start,
int end)
Returns a column containing the rows in this column beginning with start inclusive, and ending
with end exclusive
|
C |
last(int numRows) |
C |
map(Function<? super T,? extends T> fun)
Maps the function across all rows, appending the results to a new Column of the same type
|
C |
max(Column<T> other)
Returns a column containing the element-wise min between this column and other column
|
C |
min(Column<T> other)
Returns a column containing the element-wise min between this column and other column
|
String |
name()
Returns the column's name.
|
C |
sampleN(int n)
Returns a column containing a random sample of the values in this column
|
C |
sampleX(double proportion)
Returns a table consisting of randomly selected values from this column.
|
C |
set(Selection condition,
Column<T> other)
Updates this column where values matching the selection are replaced with the corresponding
value from the given column
|
C |
set(Selection rowSelection,
T newValue)
Conditionally update this column, replacing current values with newValue for all rows where the
current value matches the selection criteria
|
C |
setName(String name)
Sets the columns name to the given string
|
C |
sorted(Comparator<? super T> comp)
Returns a new Column of the same type sorted according to the provided Comparator
|
C |
subset(int[] rows) |
String |
toString() |
ColumnType |
type()
Returns this column's ColumnType
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
allMatch, anyMatch, append, append, append, appendCell, appendCell, appendMissing, appendObj, asBytes, asList, asObjectArray, byteSize, clear, columnWidth, contains, copy, count, count, countMissing, countUnique, emptyCopy, get, getString, getUnformattedString, interpolate, isEmpty, isMissing, isMissing, isNotMissing, lag, lead, map, mapInto, max, min, noneMatch, print, reduce, reduce, removeMissing, rolling, rowComparator, set, set, set, set, setMissing, setMissingTo, size, sortAscending, sortDescending, summary, title, unique, where
forEach, iterator, spliterator
compare, comparing, comparing, comparingDouble, comparingInt, comparingLong, equals, naturalOrder, nullsFirst, nullsLast, reversed, reverseOrder, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
public static final int DEFAULT_ARRAY_SIZE
public AbstractColumn(ColumnType type, String name)
public C setName(String name)
Column
public ColumnType type()
Column
type
in interface Column<T>
ColumnType
public abstract Column<T> emptyCopy()
Column
public C filter(Predicate<? super T> test)
Column
public C sorted(Comparator<? super T> comp)
Column
public C map(Function<? super T,? extends T> fun)
Column
public C min(Column<T> other)
Column
TODO(lwhite) Override in column subtypes for better performance
public C max(Column<T> other)
Column
TODO(lwhite) Override in column subtypes for better performance
public C set(Selection condition, Column<T> other)
Column
public C set(Selection rowSelection, T newValue)
Column
public C sampleN(int n)
Column
public C sampleX(double proportion)
Column
public C inRange(int start, int end)
Column
public StringColumn asStringColumn()
Column
asStringColumn
in interface Column<T>
StringColumn
built using the column Column.getUnformattedString(int)
methodCopyright © 2020. All rights reserved.