public class DateColumn extends AbstractColumn implements DateColumnUtils
| Modifier and Type | Field and Description |
|---|---|
static int |
MISSING_VALUE |
isMissing, isNotMissing| Constructor and Description |
|---|
DateColumn(ColumnMetadata metadata) |
| Modifier and Type | Method and Description |
|---|---|
void |
add(int f) |
void |
add(java.time.LocalDate f) |
void |
addCell(java.lang.String string) |
void |
append(Column column) |
byte[] |
asBytes(int rowNumber)
Returns the contents of the cell at rowNumber as a byte[]
|
java.util.Set<java.time.LocalDate> |
asSet() |
DateTimeColumn |
atTime(TimeColumn c)
Returns a DateTime column where each value consists of the dates from this column combined with the corresponding
times from the other column
|
java.util.List<java.time.LocalDate> |
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() |
boolean |
contains(java.time.LocalDate localDate) |
int |
convert(java.lang.String value)
Returns a PackedDate as converted from the given string
|
DateColumn |
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 DateColumn |
create(java.lang.String name) |
static DateColumn |
create(java.lang.String columnName,
it.unimi.dsi.fastutil.ints.IntArrayList dates) |
it.unimi.dsi.fastutil.ints.IntArrayList |
data() |
ShortColumn |
dayOfMonth() |
CategoryColumn |
dayOfWeek() |
ShortColumn |
dayOfWeekValue() |
ShortColumn |
dayOfYear() |
DateColumn |
difference()
Returns a new column of the same type as the receiver, such that the values in the new column
contain the difference between each cell in the original and it's predecessor.
|
DateColumn |
emptyCopy()
Returns a copy of the receiver with no data.
|
DateColumn |
emptyCopy(int rowSize)
Returns an empty copy of the receiver, with its internal storage initialized to the given row size
|
java.time.LocalDate |
firstElement() |
java.time.LocalDate |
get(int index) |
int |
getInt(int index) |
java.lang.String |
getString(int row)
Returns a string representation of the value at the given row
|
it.unimi.dsi.fastutil.ints.IntIterator |
intIterator() |
Selection |
isAfter(int value) |
Selection |
isAfter(java.time.LocalDate value) |
Selection |
isBefore(int value) |
Selection |
isBefore(java.time.LocalDate value) |
boolean |
isEmpty()
Returns true if the column has no data
|
Selection |
isEqualTo(DateColumn column)
Returns a bitmap flagging the records for which the value in this column is equal to the value in the given
column
Columnwise isEqualTo.
|
Selection |
isEqualTo(java.time.LocalDate value) |
Selection |
isFirstDayOfMonth() |
Selection |
isFriday() |
Selection |
isInApril() |
Selection |
isInAugust() |
Selection |
isInDecember() |
Selection |
isInFebruary() |
Selection |
isInJanuary() |
Selection |
isInJuly() |
Selection |
isInJune() |
Selection |
isInMarch() |
Selection |
isInMay() |
Selection |
isInNovember() |
Selection |
isInOctober() |
Selection |
isInQ1() |
Selection |
isInQ2() |
Selection |
isInQ3() |
Selection |
isInQ4() |
Selection |
isInSeptember() |
Selection |
isInYear(int year) |
Selection |
isLastDayOfMonth() |
Selection |
isMissing() |
Selection |
isMonday() |
Selection |
isNotMissing() |
Selection |
isOnOrAfter(int value) |
Selection |
isOnOrAfter(java.time.LocalDate value) |
Selection |
isOnOrBefore(int value) |
Selection |
isOnOrBefore(java.time.LocalDate value) |
Selection |
isSaturday() |
Selection |
isSunday() |
Selection |
isThursday() |
Selection |
isTuesday() |
Selection |
isWednesday() |
java.util.Iterator<java.time.LocalDate> |
iterator()
Returns an iterator over elements of type
T. |
java.time.LocalDate |
max() |
java.time.LocalDate |
min() |
CategoryColumn |
month() |
ShortColumn |
monthValue() |
java.lang.String |
print() |
it.unimi.dsi.fastutil.ints.IntComparator |
rowComparator() |
Selection |
select(IntBiPredicate predicate,
int value) |
Selection |
select(IntPredicate predicate) |
DateColumn |
selectIf(IntPredicate predicate)
This version operates on predicates that treat the given IntPredicate as operating on a packed local time
This is much more efficient that using a LocalTimePredicate, but requires that the developer understand the
semantics of packedLocalTimes
|
DateColumn |
selectIf(LocalDatePredicate predicate) |
void |
set(int index,
int value) |
int |
size() |
void |
sortAscending() |
void |
sortDescending() |
Table |
summary()
Returns a table of dates and the number of observations of those dates
|
java.util.List<java.time.LocalDate> |
top(int n)
Returns the largest ("top") n values in the column
|
java.lang.String |
toString() |
ColumnType |
type()
Returns this column's ColumnType
|
DateColumn |
unique()
Returns a column of the same type as the receiver, containing only the unique values of the receiver
|
DateTimeColumn |
with(TimeColumn timeColumn) |
ShortColumn |
year() |
columnMetadata, columnWidth, comment, id, metadata, name, setComment, setNameclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitcolumnMetadata, columnWidth, comment, first, first, id, last, last, metadata, name, setComment, setName, subset, title, toDoubleArraypublic DateColumn(ColumnMetadata metadata)
public ColumnType type()
Columnpublic void add(int f)
public it.unimi.dsi.fastutil.ints.IntArrayList data()
data in interface DateColumnUtilspublic void set(int index,
int value)
public void add(java.time.LocalDate f)
public java.lang.String getString(int row)
Columnpublic DateColumn emptyCopy()
Columnpublic DateColumn emptyCopy(int rowSize)
Columnpublic DateColumn copy()
Columnpublic void sortAscending()
sortAscending in interface Columnpublic void sortDescending()
sortDescending in interface Columnpublic int countUnique()
ColumncountUnique in interface Columnpublic DateColumn unique()
Columnpublic java.time.LocalDate firstElement()
public java.time.LocalDate max()
public java.time.LocalDate min()
public CategoryColumn dayOfWeek()
public ShortColumn dayOfWeekValue()
public ShortColumn dayOfMonth()
public ShortColumn dayOfYear()
public ShortColumn monthValue()
public CategoryColumn month()
public ShortColumn year()
public java.time.LocalDate get(int index)
public static DateColumn create(java.lang.String name)
public boolean isEmpty()
Columnpublic it.unimi.dsi.fastutil.ints.IntComparator rowComparator()
rowComparator in interface Columnpublic static DateColumn create(java.lang.String columnName, it.unimi.dsi.fastutil.ints.IntArrayList dates)
public int convert(java.lang.String value)
value - A string representation of a datejava.time.format.DateTimeParseException - if no parser can be found for the date formatpublic void addCell(java.lang.String string)
addCell in interface ColumnaddCell in class AbstractColumnpublic int getInt(int index)
public Selection isEqualTo(java.time.LocalDate value)
public Selection isEqualTo(DateColumn column)
public Table summary()
public DateTimeColumn atTime(TimeColumn c)
public Selection isAfter(int value)
public Selection isAfter(java.time.LocalDate value)
public Selection isBefore(int value)
public Selection isBefore(java.time.LocalDate value)
public Selection isOnOrBefore(java.time.LocalDate value)
public Selection isOnOrBefore(int value)
public Selection isOnOrAfter(java.time.LocalDate value)
public Selection isOnOrAfter(int value)
public Selection isMonday()
public Selection isTuesday()
public Selection isWednesday()
public Selection isThursday()
public Selection isFriday()
public Selection isSaturday()
public Selection isSunday()
public Selection isInJanuary()
public Selection isInFebruary()
public Selection isInMarch()
public Selection isInApril()
public Selection isInMay()
public Selection isInJune()
public Selection isInJuly()
public Selection isInAugust()
public Selection isInSeptember()
public Selection isInOctober()
public Selection isInNovember()
public Selection isInDecember()
public Selection isFirstDayOfMonth()
public Selection isLastDayOfMonth()
public Selection isInQ1()
public Selection isInQ2()
public Selection isInQ3()
public Selection isInQ4()
public Selection isInYear(int year)
public int countMissing()
countMissing in interface Columnpublic Selection isNotMissing()
isNotMissing in interface Columnpublic java.lang.String toString()
toString in class java.lang.Objectpublic DateColumn selectIf(LocalDatePredicate predicate)
public DateColumn selectIf(IntPredicate predicate)
public java.util.List<java.time.LocalDate> 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 java.util.List<java.time.LocalDate> 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.ints.IntIterator intIterator()
public Selection select(IntPredicate predicate)
public Selection select(IntBiPredicate predicate, int value)
public java.util.Set<java.time.LocalDate> asSet()
public DateTimeColumn with(TimeColumn timeColumn)
public boolean contains(java.time.LocalDate localDate)
public int byteSize()
Columnpublic byte[] asBytes(int rowNumber)
public java.util.Iterator<java.time.LocalDate> iterator()
T.iterator in interface java.lang.Iterable<java.time.LocalDate>public DateColumn difference()
Columndifference in interface Columndifference in class AbstractColumn