Iterable<LocalDateTime>, Comparator<LocalDateTime>, CategoricalColumn<LocalDateTime>, Column<LocalDateTime>, DateTimeFilters, DateTimeMapFunctions, TemporalColumn<LocalDateTime>, TemporalFillers<LocalDateTime,DateTimeColumn>, TemporalFilters<LocalDateTime>, TemporalMapFunctions<LocalDateTime>, DateAndDateTimeFilterSpec<LocalDateTime>, DateTimeFilterSpec<LocalDateTime>, FilterSpec<LocalDateTime>, InstantFilterSpec<LocalDateTime>, TimeAndDateTimeFilterSpec<LocalDateTime>public class DateTimeColumn extends AbstractColumn<DateTimeColumn,LocalDateTime> implements DateTimeMapFunctions, DateTimeFilters, TemporalFillers<LocalDateTime,DateTimeColumn>, CategoricalColumn<LocalDateTime>
| Modifier and Type | Field | Description |
|---|---|---|
protected it.unimi.dsi.fastutil.longs.LongArrayList |
data |
The dateTime values held in this column, in their
PackedLocalDateTime format |
DEFAULT_ARRAY_SIZE| Modifier and Type | Method | Description |
|---|---|---|
DateTimeColumn |
append(LocalDateTime dateTime) |
Appends value to the bottom of this column and return this column
|
DateTimeColumn |
append(Column<LocalDateTime> column) |
Appends all the values in the argument to the bottom of this column and return this column
|
DateTimeColumn |
append(Column<LocalDateTime> column,
int row) |
Appends the value at the given row in the given column to the bottom of this column and return
this column
|
DateTimeColumn |
appendCell(String stringValue) |
Add one element to the bottom of this column and set its value to the parsed value of the given
String.
|
DateTimeColumn |
appendCell(String stringValue,
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
|
DateTimeColumn |
appendInternal(long dateTime) |
Returns this column with the argument appended at the bottom
|
DateTimeColumn |
appendMissing() |
Appends a missing value appropriate to the column
|
DateTimeColumn |
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() |
|
long[] |
asEpochMillisArray() |
Returns an array where each entry is the difference, measured in milliseconds, between the
LocalDateTime and midnight, January 1, 1970 UTC.
|
long[] |
asEpochMillisArray(ZoneOffset offset) |
Returns an array where each entry is the difference, measured in milliseconds, between the
LocalDateTime and midnight, January 1, 1970 UTC.
|
long[] |
asEpochSecondArray() |
Returns an array where each entry is the difference, measured in seconds, between the
LocalDateTime and midnight, January 1, 1970 UTC.
|
long[] |
asEpochSecondArray(ZoneOffset offset) |
Returns the seconds from epoch for each value as an array based on the given offset
|
InstantColumn |
asInstantColumn() |
|
InstantColumn |
asInstantColumn(ZoneId zone) |
|
LocalDateTime[] |
asObjectArray() |
Returns an array of objects as appropriate for my type of column
|
Set<LocalDateTime> |
asSet() |
Returns a Set containing all the unique values in this column
|
List<LocalDateTime> |
bottom(int n) |
Returns the smallest ("bottom") n values in the 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(LocalDateTime o1,
LocalDateTime o2) |
|
boolean |
contains(LocalDateTime dateTime) |
Returns
true if the given object appears in this column, and false otherwise |
DateTimeColumn |
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 DateTimeColumn |
create(String name) |
|
static DateTimeColumn |
create(String name,
int initialSize) |
|
static DateTimeColumn |
create(String name,
LocalDateTime... data) |
|
static DateTimeColumn |
create(String name,
Collection<LocalDateTime> data) |
|
static DateTimeColumn |
create(String name,
Stream<LocalDateTime> stream) |
|
static DateTimeColumn |
createInternal(String name,
long[] longs) |
For internal Tablesaw use only Returns a new column with the given name and data
|
DateTimeColumn |
emptyCopy() |
Returns a copy of the receiver with no data.
|
DateTimeColumn |
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
|
DateTimeColumn |
fillWith(Iterable<LocalDateTime> iterable) |
|
DateTimeColumn |
fillWith(Supplier<LocalDateTime> supplier) |
|
DateTimeColumn |
fillWith(Iterator<LocalDateTime> iterator) |
|
LocalDateTime |
get(int index) |
Returns a value of the Object type stored in the column (e.g.
|
double |
getDouble(int i) |
|
long |
getLongInternal(int index) |
Returns the internal (long-encoded) value stored in the column at the given row
|
protected long |
getPackedDateTime(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
|
boolean |
isEmpty() |
Returns true if the column has no data
|
boolean |
isMissing(int rowNumber) |
Returns true if the value at rowNumber is missing
|
Iterator<LocalDateTime> |
iterator() |
Returns an iterator over elements of type
T. |
DateTimeColumn |
lag(int n) |
Returns a column of the same type and size as the receiver, containing the receivers values
offset by n.
|
it.unimi.dsi.fastutil.longs.LongIterator |
longIterator() |
|
LocalDateTime |
max() |
|
LocalDateTime |
min() |
|
DateTimeColumn |
plus(long amountToAdd,
ChronoUnit unit) |
|
DateTimeColumn |
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
|
DateTimeColumn |
set(int index,
long value) |
|
DateTimeColumn |
set(int index,
LocalDateTime value) |
Sets the value at index row to the given value and return this column
|
DateTimeColumn |
set(int row,
Column<LocalDateTime> column,
int sourceRow) |
Sets the value at row to the value at sourceRow in the given column and return this column
|
DateTimeColumn |
set(Selection rowSelection,
LocalDateTime newValue) |
Conditionally update this column, replacing current values with newValue for all rows where the
current value matches the selection criteria
|
DateTimeColumn |
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) |
|
void |
setPrintFormatter(DateTimeColumnFormatter formatter) |
|
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
|
DateTimeColumn |
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<LocalDateTime> |
top(int n) |
Returns the largest ("top") n values in the column
|
DateTimeColumn |
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(long value) |
|
DateTimeColumn |
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, toString, typecountByCategoryallMatch, anyMatch, asList, asStringColumn, columnWidth, count, count, filter, first, indexOf, inRange, interpolate, isMissing, isNotMissing, 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, thenComparingLongisAfter, isAfter, isAfter, isAfterNoon, isBefore, isBefore, isBefore, isBeforeNoon, isBetweenExcluding, isBetweenIncluding, isEqualTo, isEqualTo, isFirstDayOfMonth, isFriday, isInApril, isInAugust, isInDecember, isInFebruary, isInJanuary, isInJuly, isInJune, isInMarch, isInMay, isInNovember, isInOctober, isInQ1, isInQ2, isInQ3, isInQ4, isInSeptember, isInYear, isLastDayOfMonth, isMidnight, isMissing, isMonday, isNoon, isNotEqualTo, isNotEqualTo, isNotMissing, isOnOrAfter, isOnOrAfter, isOnOrAfter, isOnOrBefore, isOnOrBefore, isOnOrBefore, isSaturday, isSunday, isThursday, isTuesday, isWednesdaydate, dayOfMonth, dayOfWeek, dayOfWeekValue, dayOfYear, hour, hourMinute, lead, minute, minuteOfDay, month, monthValue, plusDays, plusHours, plusMicros, plusMillis, plusMinutes, plusMonths, plusSeconds, plusWeeks, plusYears, secondOfDay, time, timeWindow, timeWindow, year, yearDay, yearMonth, yearQuarter, yearWeekforEach, spliteratorclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waiteval, eval, eval, eval, eval, isAfter, isBefore, isBetweenExcluding, isBetweenIncluding, isEqualTodifference, differenceInDays, differenceInHours, differenceInMilliseconds, differenceInMinutes, differenceInSeconds, differenceInYears, missingValues, temporalColumnNameprotected it.unimi.dsi.fastutil.longs.LongArrayList data
PackedLocalDateTime formatpublic int valueHash(int rowNumber)
valueHash in interface Column<LocalDateTime>public boolean equals(int rowNumber1,
int rowNumber2)
equals in interface Column<LocalDateTime>public static DateTimeColumn createInternal(String name, long[] longs)
name - The column namelongs - An array of longs representing datetime values in Tablesaw internal formatpublic static DateTimeColumn create(String name)
public static DateTimeColumn create(String name, int initialSize)
public static DateTimeColumn create(String name, Collection<LocalDateTime> data)
public static DateTimeColumn create(String name, Stream<LocalDateTime> stream)
public DateTimeColumn plus(long amountToAdd, ChronoUnit unit)
plus in interface DateTimeMapFunctionsplus in interface TemporalMapFunctions<LocalDateTime>public static DateTimeColumn create(String name, LocalDateTime... data)
public static boolean valueIsMissing(long value)
public boolean isMissing(int rowNumber)
isMissing in interface Column<LocalDateTime>public DateTimeColumn subset(int[] rows)
subset in interface Column<LocalDateTime>subset in class AbstractColumn<DateTimeColumn,LocalDateTime>public DateTimeColumn removeMissing()
removeMissing in interface Column<LocalDateTime>public boolean contains(LocalDateTime dateTime)
true if the given object appears in this column, and false otherwise
TODO override in column subtypes for performance
contains in interface Column<LocalDateTime>public DateTimeColumn setMissing(int i)
setMissing in interface Column<LocalDateTime>public DateTimeColumn where(Selection selection)
Selectionwhere in interface Column<LocalDateTime>public void setPrintFormatter(DateTimeFormatter dateTimeFormatter, String missingValueString)
public void setPrintFormatter(DateTimeFormatter dateTimeFormatter)
public void setPrintFormatter(DateTimeColumnFormatter formatter)
public DateTimeColumn 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<LocalDateTime>lag in interface DateTimeMapFunctionspublic DateTimeColumn appendCell(String stringValue)
appendCell in interface Column<LocalDateTime>public DateTimeColumn appendCell(String stringValue, AbstractColumnParser<?> parser)
appendCell in interface Column<LocalDateTime>public DateTimeColumn append(LocalDateTime dateTime)
append in interface Column<LocalDateTime>public DateTimeColumn appendObj(Object obj)
appendObj in interface Column<LocalDateTime>public int size()
size in interface Column<LocalDateTime>size in interface TemporalFilters<LocalDateTime>public DateTimeColumn appendInternal(long dateTime)
appendInternal in interface TemporalColumn<LocalDateTime>public String getString(int row)
getString in interface Column<LocalDateTime>row - The index of the row.public String getUnformattedString(int row)
getUnformattedString in interface Column<LocalDateTime>public DateTimeColumn emptyCopy()
emptyCopy in interface Column<LocalDateTime>emptyCopy in interface TemporalMapFunctions<LocalDateTime>emptyCopy in class AbstractColumn<DateTimeColumn,LocalDateTime>Columnpublic DateTimeColumn emptyCopy(int rowSize)
emptyCopy in interface Column<LocalDateTime>rowSize - the initial row sizeColumnpublic DateTimeColumn copy()
copy in interface Column<LocalDateTime>Columnpublic void clear()
clear in interface Column<LocalDateTime>public void sortAscending()
sortAscending in interface Column<LocalDateTime>public void sortDescending()
sortDescending in interface Column<LocalDateTime>public Table summary()
summary in interface Column<LocalDateTime>public int countUnique()
countUnique in interface Column<LocalDateTime>public DateTimeColumn unique()
unique in interface Column<LocalDateTime>Columnpublic boolean isEmpty()
isEmpty in interface Column<LocalDateTime>public long getLongInternal(int index)
getLongInternal in interface TemporalColumn<LocalDateTime>getLongInternal in interface TemporalFilters<LocalDateTime>protected long getPackedDateTime(int index)
public LocalDateTime get(int index)
get in interface Column<LocalDateTime>get in interface TemporalColumn<LocalDateTime>get in interface TemporalFilters<LocalDateTime>public it.unimi.dsi.fastutil.ints.IntComparator rowComparator()
rowComparator in interface Column<LocalDateTime>public DateTimeColumn set(Selection rowSelection, LocalDateTime newValue)
Example: myColumn.set(myColumn.valueIsMissing(), LocalDateTime.now()); // no more missing values
set in interface Column<LocalDateTime>set in class AbstractColumn<DateTimeColumn,LocalDateTime>public int countMissing()
countMissing in interface Column<LocalDateTime>public long[] asEpochSecondArray()
If a value is missing, DateTimeColumnType.missingValueIndicator() is used
public long[] asEpochSecondArray(ZoneOffset offset)
If a value is missing, DateTimeColumnType.missingValueIndicator() is used
public long[] asEpochMillisArray()
If a missing value is encountered, DateTimeColumnType.missingValueIndicator() is inserted in the array
public long[] asEpochMillisArray(ZoneOffset offset)
If a missing value is encountered, DateTimeColumnType.missingValueIndicator() is inserted in the array
public InstantColumn asInstantColumn()
public InstantColumn asInstantColumn(ZoneId zone)
public DateTimeColumn append(Column<LocalDateTime> column)
append in interface Column<LocalDateTime>public DateTimeColumn append(Column<LocalDateTime> column, int row)
append in interface Column<LocalDateTime>public DateTimeColumn set(int row, Column<LocalDateTime> column, int sourceRow)
set in interface Column<LocalDateTime>public LocalDateTime max()
public DateTimeColumn appendMissing()
appendMissing in interface Column<LocalDateTime>public LocalDateTime min()
min in interface TemporalMapFunctions<LocalDateTime>public DateTimeColumn set(int index, long value)
public DateTimeColumn set(int index, LocalDateTime value)
set in interface Column<LocalDateTime>public List<LocalDateTime> 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<LocalDateTime> 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 it.unimi.dsi.fastutil.longs.LongIterator longIterator()
public Set<LocalDateTime> asSet()
ColumnasSet in interface Column<LocalDateTime>public int byteSize()
byteSize in interface Column<LocalDateTime>public byte[] asBytes(int rowNumber)
asBytes in interface Column<LocalDateTime>rowNumber - index of the rowpublic double getDouble(int i)
public double[] asDoubleArray()
public DoubleColumn asDoubleColumn()
public Iterator<LocalDateTime> iterator()
T.iterator in interface Iterable<LocalDateTime>public DateTimeColumn fillWith(Iterator<LocalDateTime> iterator)
fillWith in interface TemporalFillers<LocalDateTime,DateTimeColumn>public DateTimeColumn fillWith(Iterable<LocalDateTime> iterable)
fillWith in interface TemporalFillers<LocalDateTime,DateTimeColumn>public DateTimeColumn fillWith(Supplier<LocalDateTime> supplier)
fillWith in interface TemporalFillers<LocalDateTime,DateTimeColumn>public LocalDateTime[] asObjectArray()
asObjectArray in interface Column<LocalDateTime>public int compare(LocalDateTime o1, LocalDateTime o2)
compare in interface Comparator<LocalDateTime>Copyright © 2022. All rights reserved.