public class DateColumn extends AbstractColumn implements DateMapUtils
Modifier and Type | Field and Description |
---|---|
static int |
MISSING_VALUE |
isEqualTo, isGreaterThan, isGreaterThanOrEqualTo, isLessThan, isLessThanOrEqualTo, isMissing, isNotMissing
Constructor and Description |
---|
DateColumn(ColumnMetadata metadata) |
DateColumn(ColumnMetadata metadata,
Locale locale) |
DateColumn(String name) |
DateColumn(String name,
int initialSize) |
DateColumn(String name,
List<LocalDate> data) |
DateColumn(String name,
Locale locale) |
Modifier and Type | Method and Description |
---|---|
void |
append(Column column) |
void |
append(LocalDate f) |
void |
appendCell(String string) |
void |
appendInternal(int f) |
byte[] |
asBytes(int rowNumber)
Returns the contents of the cell at rowNumber as a byte[]
|
Set<LocalDate> |
asSet() |
List<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(LocalDate localDate) |
int |
convert(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.
|
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.
|
LocalDate |
firstElement() |
LocalDate |
get(int index) |
int |
getIntInternal(int index) |
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(LocalDate value) |
Selection |
isBefore(int value) |
Selection |
isBefore(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(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(LocalDate value) |
Selection |
isOnOrBefore(int value) |
Selection |
isOnOrBefore(LocalDate value) |
Selection |
isSaturday() |
Selection |
isSunday() |
Selection |
isThursday() |
Selection |
isTuesday() |
Selection |
isWednesday() |
Iterator<LocalDate> |
iterator()
Returns an iterator over elements of type
T . |
LocalDate |
max() |
LocalDate |
min() |
CategoryColumn |
month() |
ShortColumn |
monthValue() |
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
|
List<LocalDate> |
top(int n)
Returns the largest ("top") n values in the column
|
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, setName
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
atStartOfDay, atTime, atTime, dateColumnName, difference, differenceInDays, differenceInMonths, differenceInWeeks, differenceInYears, minus, minusDays, minusMonths, minusWeeks, minusYears, plus, plusDays, plusMonths, plusWeeks, plusYears
columnMetadata, columnWidth, comment, first, first, id, last, last, metadata, name, rolling, setComment, setName, subset, title, toDoubleArray
forEach, spliterator
public DateColumn(String name)
public DateColumn(String name, int initialSize)
public DateColumn(ColumnMetadata metadata)
public DateColumn(ColumnMetadata metadata, Locale locale)
public ColumnType type()
Column
type
in interface Column
ColumnType
public void appendInternal(int f)
public it.unimi.dsi.fastutil.ints.IntArrayList data()
data
in interface DateColumnUtils
public void set(int index, int value)
public void append(LocalDate f)
public String getString(int row)
Column
public DateColumn emptyCopy()
Column
public DateColumn emptyCopy(int rowSize)
Column
public DateColumn copy()
Column
public void sortAscending()
sortAscending
in interface Column
public void sortDescending()
sortDescending
in interface Column
public int countUnique()
Column
countUnique
in interface Column
public DateColumn unique()
Column
public LocalDate firstElement()
public LocalDate max()
public LocalDate min()
public CategoryColumn dayOfWeek()
public ShortColumn dayOfWeekValue()
public ShortColumn dayOfMonth()
public ShortColumn dayOfYear()
public ShortColumn monthValue()
public CategoryColumn month()
public ShortColumn year()
public LocalDate get(int index)
get
in interface DateMapUtils
public boolean isEmpty()
Column
public it.unimi.dsi.fastutil.ints.IntComparator rowComparator()
rowComparator
in interface Column
public int convert(String value)
value
- A string representation of a dateDateTimeParseException
- if no parser can be found for the date formatpublic void appendCell(String string)
appendCell
in interface Column
appendCell
in class AbstractColumn
public int getIntInternal(int index)
getIntInternal
in interface DateMapUtils
public Selection isEqualTo(DateColumn column)
public Table summary()
public Selection isAfter(int value)
public Selection isBefore(int value)
public Selection isOnOrBefore(int 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 Column
public Selection isNotMissing()
isNotMissing
in interface Column
public DateColumn selectIf(LocalDatePredicate predicate)
public DateColumn selectIf(IntPredicate predicate)
public List<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 List<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 DateTimeColumn with(TimeColumn timeColumn)
public boolean contains(LocalDate localDate)
public int byteSize()
Column
public byte[] asBytes(int rowNumber)
public DateColumn difference()
Column
difference
in interface Column
difference
in class AbstractColumn
Column
Copyright © 2017. All rights reserved.