Iterable<LocalTime>, Comparator<LocalTime>, CategoricalColumn<LocalTime>, Column<LocalTime>, TimeFillers<TimeColumn>, TimeFilters, TimeMapFunctionspublic class TimeColumn extends AbstractColumn<TimeColumn,LocalTime> implements CategoricalColumn<LocalTime>, TimeFilters, TimeFillers<TimeColumn>, TimeMapFunctions
| Modifier and Type | Field | Description |
|---|---|---|
protected it.unimi.dsi.fastutil.ints.IntArrayList |
data |
DEFAULT_ARRAY_SIZE| Modifier and Type | Method | Description |
|---|---|---|
TimeColumn |
append(LocalTime time) |
Appends value to the bottom of this column and return this column
|
TimeColumn |
append(Column<LocalTime> column) |
Appends all the values in the argument to the bottom of this column and return this column
|
TimeColumn |
append(Column<LocalTime> column,
int row) |
Appends the value at the given row in the given column to the bottom of this column and return
this column
|
TimeColumn |
appendCell(String object) |
Add one element to the bottom of this column and set its value to the parsed value of the given
String.
|
TimeColumn |
appendCell(String object,
AbstractColumnParser<?> parser) |
Add one element to the bottom of this column and set its value to the parsed value of the given
String, as performed by the given parser
|
TimeColumn |
appendInternal(int f) |
|
TimeColumn |
appendMissing() |
Appends a missing value appropriate to the column
|
TimeColumn |
appendObj(Object obj) |
Appends the given value to the bottom of this column and return this column
|
byte[] |
asBytes(int rowNumber) |
Returns the contents of the cell at rowNumber as a byte[]
|
double[] |
asDoubleArray() |
|
DoubleColumn |
asDoubleColumn() |
|
List<LocalTime> |
asList() |
Returns the entire contents of this column as a list
|
LocalTime[] |
asObjectArray() |
Returns an array of objects as appropriate for my type of column
|
Set<LocalTime> |
asSet() |
Returns a Set containing all the unique values in this column
|
List<LocalTime> |
bottom(int n) |
Returns the smallest ("bottom") n values in the column, Does not change the order in this
column
|
int |
byteSize() |
Returns the width of a cell in this column, in bytes.
|
void |
clear() |
Removes all elements TODO: Make this return this column
|
int |
compare(LocalTime o1,
LocalTime o2) |
|
boolean |
contains(LocalTime time) |
Returns
true if the given object appears in this column, and false otherwise |
TimeColumn |
copy() |
Returns a deep copy of the receiver
|
int |
countMissing() |
Returns the count of missing values in this column
|
int |
countUnique() |
Returns the count of unique values in this column.
|
static TimeColumn |
create(String name) |
|
static TimeColumn |
create(String name,
int initialSize) |
|
static TimeColumn |
create(String name,
LocalTime... data) |
|
static TimeColumn |
create(String name,
Collection<LocalTime> data) |
|
static TimeColumn |
create(String name,
Stream<LocalTime> stream) |
|
static TimeColumn |
create(String name,
AbstractColumnParser<LocalTime> parser) |
|
static TimeColumn |
createInternal(String name,
int[] data) |
|
TimeColumn |
emptyCopy() |
Returns a copy of the receiver with no data.
|
TimeColumn |
emptyCopy(int rowSize) |
Returns an empty copy of the receiver, with its internal storage initialized to the given row
size.
|
boolean |
equals(int rowNumber1,
int rowNumber2) |
Returns true if the value in this column at rowNumber1 is equal to the value at rowNumber2
|
TimeColumn |
fillWith(Iterable<LocalTime> iterable) |
|
TimeColumn |
fillWith(Supplier<LocalTime> supplier) |
|
TimeColumn |
fillWith(Iterator<LocalTime> iterator) |
|
LocalTime |
get(int index) |
Returns the value at the given zero-based index
|
double |
getDouble(int i) |
|
int |
getIntInternal(int index) |
Returns the packed time representation of the value at index
|
protected int |
getPackedTime(int index) |
|
String |
getString(int row) |
Returns a string representation of the value at the given row.
|
String |
getUnformattedString(int row) |
Returns a String representation of the value at index r, without any formatting applied
|
it.unimi.dsi.fastutil.ints.IntIterator |
intIterator() |
|
boolean |
isEmpty() |
Returns true if the column has no data
|
Selection |
isMissing() |
Returns a selection containing an index for every missing value in this column
|
boolean |
isMissing(int rowNumber) |
Returns true if the value at rowNumber is missing
|
Selection |
isNotMissing() |
Returns a selection containing an index for every non-missing value in this column
|
Iterator<LocalTime> |
iterator() |
Returns an iterator over elements of type
T. |
TimeColumn |
lag(int n) |
Returns a column of the same type and size as the receiver, containing the receivers values
offset by n.
|
LocalTime |
max() |
|
LocalTime |
min() |
|
TimeColumn |
removeMissing() |
Returns a copy of this column with the missing values removed
|
it.unimi.dsi.fastutil.ints.IntComparator |
rowComparator() |
Returns an IntComparator for sorting my rows
|
TimeColumn |
set(int index,
int value) |
|
TimeColumn |
set(int index,
LocalTime value) |
Sets the value at index row to the given value and return this column
|
TimeColumn |
set(int row,
Column<LocalTime> column,
int sourceRow) |
Sets the value at row to the value at sourceRow in the given column and return this column
|
TimeColumn |
set(Selection rowSelection,
LocalTime newValue) |
Conditionally update this column, replacing current values with newValue for all rows where the
current value matches the selection criteria
|
TimeColumn |
setMissing(int i) |
Sets the value at index i to the missing-value indicator for this column type, and return this
column
|
void |
setPrintFormatter(DateTimeFormatter dateTimeFormatter) |
|
void |
setPrintFormatter(DateTimeFormatter dateTimeFormatter,
String missingValueString) |
|
int |
size() |
Returns the number of elements in this column, including missing values
|
void |
sortAscending() |
Sorts my values in ascending order
|
void |
sortDescending() |
Sorts my values in descending order
|
TimeColumn |
subset(int[] rows) |
Return a column of the same type containing just those elements whose indexes are included in
the given array
|
Table |
summary() |
Returns a table containing a ColumnType specific summary of the data in this column
|
List<LocalTime> |
top(int n) |
Returns the largest ("top") n values in the column.
|
String |
toString() |
|
TimeColumn |
unique() |
Returns a column of the same type containing only the unique values
|
int |
valueHash(int rowNumber) |
Returns an int suitable as a hash for the value in this column at the given index
|
static boolean |
valueIsMissing(int i) |
|
TimeColumn |
where(Selection selection) |
Returns a new column containing the subset referenced by the
Selection |
asStringColumn, filter, first, indexOf, inRange, last, map, max, min, name, parser, sampleN, sampleX, set, setName, setParser, sorted, typecountByCategoryallMatch, anyMatch, asStringColumn, columnWidth, count, count, filter, first, indexOf, inRange, interpolate, last, map, map, mapInto, max, max, min, min, name, noneMatch, parser, print, reduce, reduce, rolling, sampleN, sampleX, set, set, set, setMissingTo, setName, setParser, sorted, title, typecomparing, comparing, comparingDouble, comparingInt, comparingLong, equals, naturalOrder, nullsFirst, nullsLast, reversed, reverseOrder, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLongforEach, spliteratorclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waiteval, eval, eval, eval, eval, isAfter, isAfter, isAfter, isAfterNoon, isBefore, isBefore, isBefore, isBeforeNoon, isEqualTo, isEqualTo, isMidnight, isNoon, isNotEqualTo, isNotEqualTo, isOnOrAfter, isOnOrAfter, isOnOrBefore, isOnOrBeforedifference, differenceInHours, differenceInMilliseconds, differenceInMinutes, differenceInSeconds, hour, hourMinute, lead, milliseconds, minus, minusHours, minusMilliseconds, minusMinutes, minusSeconds, minute, minuteOfDay, plus, plusHours, plusMilliseconds, plusMinutes, plusSeconds, second, secondOfDay, timeWindow, timeWindow, truncatedTo, with, withHour, withMillisecond, withMinute, withSecondpublic int valueHash(int rowNumber)
public boolean equals(int rowNumber1,
int rowNumber2)
public static TimeColumn createInternal(String name, int[] data)
public static boolean valueIsMissing(int i)
public static TimeColumn create(String name)
public static TimeColumn create(String name, AbstractColumnParser<LocalTime> parser)
public static TimeColumn create(String name, Collection<LocalTime> data)
public static TimeColumn create(String name, LocalTime... data)
public static TimeColumn create(String name, int initialSize)
public static TimeColumn create(String name, Stream<LocalTime> stream)
public TimeColumn appendMissing()
appendMissing in interface Column<LocalTime>public TimeColumn subset(int[] rows)
subset in interface Column<LocalTime>subset in class AbstractColumn<TimeColumn,LocalTime>public TimeColumn lag(int n)
For example if you lag a column containing 2, 3, 4 by 1, you get a column containing NA, 2, 3
lag in interface Column<LocalTime>lag in interface TimeMapFunctionspublic boolean isMissing(int rowNumber)
public int size()
public TimeColumn appendInternal(int f)
public TimeColumn append(LocalTime time)
public TimeColumn appendObj(Object obj)
public TimeColumn removeMissing()
removeMissing in interface Column<LocalTime>public String getString(int row)
public String getUnformattedString(int row)
getUnformattedString in interface Column<LocalTime>public void setPrintFormatter(DateTimeFormatter dateTimeFormatter, String missingValueString)
public void setPrintFormatter(DateTimeFormatter dateTimeFormatter)
public TimeColumn emptyCopy()
emptyCopy in interface Column<LocalTime>emptyCopy in class AbstractColumn<TimeColumn,LocalTime>Columnpublic TimeColumn emptyCopy(int rowSize)
public TimeColumn copy()
public void clear()
public void sortAscending()
sortAscending in interface Column<LocalTime>public void sortDescending()
sortDescending in interface Column<LocalTime>public LocalTime max()
public LocalTime min()
min in interface TimeMapFunctionspublic Table summary()
public int countMissing()
countMissing in interface Column<LocalTime>public int countUnique()
countUnique in interface Column<LocalTime>public TimeColumn unique()
public boolean isEmpty()
public TimeColumn appendCell(String object)
appendCell in interface Column<LocalTime>public TimeColumn appendCell(String object, AbstractColumnParser<?> parser)
appendCell in interface Column<LocalTime>public int getIntInternal(int index)
getIntInternal in interface TimeFiltersgetIntInternal in interface TimeMapFunctionsprotected int getPackedTime(int index)
public LocalTime get(int index)
get in interface Column<LocalTime>get in interface TimeFiltersget in interface TimeMapFunctionspublic it.unimi.dsi.fastutil.ints.IntComparator rowComparator()
rowComparator in interface Column<LocalTime>public double getDouble(int i)
public double[] asDoubleArray()
public DoubleColumn asDoubleColumn()
public String toString()
toString in class AbstractColumn<TimeColumn,LocalTime>public TimeColumn append(Column<LocalTime> column)
public TimeColumn append(Column<LocalTime> column, int row)
public TimeColumn set(int row, Column<LocalTime> column, int sourceRow)
public List<LocalTime> top(int n)
n - The maximum number of records to return. The actual number will be smaller if n is
greater than the number of observations in the columnpublic List<LocalTime> bottom(int n)
n - The maximum number of records to return. The actual number will be smaller if n is
greater than the number of observations in the columnpublic TimeColumn set(int index, int value)
public TimeColumn set(int index, LocalTime value)
public TimeColumn set(Selection rowSelection, LocalTime newValue)
Example: myColumn.set(myColumn.valueIsMissing(), LocalTime.now()); // no more missing values
set in interface Column<LocalTime>set in class AbstractColumn<TimeColumn,LocalTime>public it.unimi.dsi.fastutil.ints.IntIterator intIterator()
public boolean contains(LocalTime time)
true if the given object appears in this column, and false otherwise
TODO override in column subtypes for performance
public Set<LocalTime> asSet()
Columnpublic TimeColumn setMissing(int i)
setMissing in interface Column<LocalTime>public Selection isMissing()
public Selection isNotMissing()
isNotMissing in interface Column<LocalTime>public int byteSize()
public byte[] asBytes(int rowNumber)
public TimeColumn where(Selection selection)
Selectionwhere in interface Column<LocalTime>where in interface TimeFilterspublic LocalTime[] asObjectArray()
ColumnasObjectArray in interface Column<LocalTime>public TimeColumn fillWith(Iterator<LocalTime> iterator)
fillWith in interface TimeFillers<TimeColumn>public TimeColumn fillWith(Iterable<LocalTime> iterable)
fillWith in interface TimeFillers<TimeColumn>public TimeColumn fillWith(Supplier<LocalTime> supplier)
fillWith in interface TimeFillers<TimeColumn>public int compare(LocalTime o1, LocalTime o2)
compare in interface Comparator<LocalTime>Copyright © 2022. All rights reserved.