public class LongColumn extends NumberColumn<LongColumn,Long> implements CategoricalColumn<Long>
comparator, localeDEFAULT_ARRAY_SIZE| Modifier and Type | Method and Description |
|---|---|
LongColumn |
append(Column<Long> column) |
LongColumn |
append(Column<Long> column,
int row) |
LongColumn |
append(long i) |
LongColumn |
append(Long val) |
LongColumn |
appendCell(String value) |
LongColumn |
appendCell(String value,
AbstractColumnParser<?> parser) |
LongColumn |
appendMissing()
Appends a missing value appropriate to the column
|
LongColumn |
appendObj(Object obj) |
byte[] |
asBytes(int rowNumber)
Returns the contents of the cell at rowNumber as a byte[]
|
DateTimeColumn |
asDateTimes(ZoneOffset offset)
Returns a DateTimeColumn where each value is the LocalDateTime represented by the values in
this column
|
DoubleColumn |
asDoubleColumn()
Returns a new DoubleColumn containing a value for each value in this column
|
FloatColumn |
asFloatColumn()
Returns a new FloatColumn containing a value for each value in this column
|
IntColumn |
asIntColumn()
Returns a new IntColumn containing a value for each value in this column
|
long[] |
asLongArray() |
Long[] |
asObjectArray() |
ShortColumn |
asShortColumn()
Returns a new ShortColumn containing a value for each value in this column
|
LongColumn |
bottom(int n)
Returns the smallest ("bottom") n values in the column TODO(lwhite): Consider whether this
should exclude missing
|
void |
clear() |
int |
compare(Long o1,
Long o2) |
LongColumn |
copy()
Returns a deep copy of the receiver
|
Table |
countByCategory() |
int |
countUnique()
Returns the count of unique values in this column.
|
static LongColumn |
create(String name) |
static LongColumn |
create(String name,
int initialSize) |
static LongColumn |
create(String name,
long... arr) |
static LongColumn |
create(String name,
LongStream stream) |
LongColumn |
createCol(String name) |
LongColumn |
createCol(String name,
int initialSize) |
Long |
get(int index) |
double |
getDouble(int row) |
long |
getLong(int row)
Returns the value at the given index.
|
String |
getString(int row)
Returns a string representation of the value at the given row.
|
String |
getUnformattedString(int row) |
static LongColumn |
indexColumn(String columnName,
int size,
int startsWith)
Returns a new numeric column initialized with the given name and size.
|
boolean |
isMissing(int rowNumber) |
boolean |
isMissingValue(long value) |
Iterator<Long> |
iterator() |
LongColumn |
lag(int n)
Returns a column of the same type and size as the receiver, containing the receivers values
offset by n.
|
LongColumn |
removeMissing() |
LongColumn |
set(int row,
Column<Long> column,
int sourceRow) |
LongColumn |
set(int i,
long val) |
LongColumn |
set(int i,
Long val) |
Column<Long> |
set(int row,
String stringValue,
AbstractColumnParser<?> parser) |
Column<Long> |
setMissing(int i) |
int |
size() |
void |
sortAscending() |
void |
sortDescending() |
LongColumn |
subset(int[] rows) |
LongColumn |
top(int n)
Returns the largest ("top") n values in the column TODO(lwhite): Consider whether this should
exclude missing
|
LongColumn |
unique()
Returns a column of the same type as the receiver, containing only the unique values of the
receiver.
|
static boolean |
valueIsMissing(long value) |
byteSize, countMissing, emptyCopy, emptyCopy, getPrintFormatter, rowComparator, set, set, setPrintFormatter, setPrintFormatterasStringColumn, filter, first, inRange, last, map, max, min, name, sampleN, sampleX, set, set, setName, sorted, toString, typeclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitallMatch, anyMatch, asList, asStringColumn, byteSize, columnWidth, contains, count, count, countMissing, emptyCopy, emptyCopy, filter, first, inRange, interpolate, isEmpty, isMissing, isNotMissing, last, lead, map, map, mapInto, max, max, min, min, name, noneMatch, print, reduce, reduce, rolling, rowComparator, sampleN, sampleX, set, set, set, setMissingTo, setName, sorted, summary, title, type, whereforEach, spliteratorcomparing, comparing, comparingDouble, comparingInt, comparingLong, equals, naturalOrder, nullsFirst, nullsLast, reversed, reverseOrder, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLongallMatch, anyMatch, asDoubleArray, asLongColumn, asStringColumn, autoCorrelation, autoCorrelation, count, count, eval, eval, geometricMean, interpolate, isEmpty, isIn, isIn, isMissing, isNotIn, isNotIn, isNotMissing, kendalls, kurtosis, lead, mapInto, max, max, mean, median, min, min, noneMatch, pctChange, pearsons, percentile, populationVariance, product, quadraticMean, quartile1, quartile3, range, reduce, reduce, rolling, skewness, spearmans, standardDeviation, stats, sum, summarize, summary, sumOfLogs, sumOfSquares, variance, whereabs, add, add, add, asPercent, asRatio, bin, cube, cubeRoot, cumMax, cumMin, cumProd, cumSum, difference, divide, divide, divide, log10, log1p, logN, multiply, multiply, multiply, name, neg, normalize, pctChange, power, power, reciprocal, remainder, remainder, round, roundInt, sqrt, square, subtract, subtract, subtractisBetweenExclusive, isBetweenInclusive, isCloseTo, isEqualTo, isEqualTo, isGreaterThan, isGreaterThan, isGreaterThanOrEqualTo, isGreaterThanOrEqualTo, isLessThan, isLessThan, isLessThanOrEqualTo, isLessThanOrEqualTo, isNegative, isNonNegative, isNotEqualTo, isNotEqualTo, isPositive, isZeropublic static LongColumn create(String name)
public static LongColumn create(String name, long... arr)
public static LongColumn create(String name, int initialSize)
public static LongColumn create(String name, LongStream stream)
public LongColumn createCol(String name, int initialSize)
createCol in class NumberColumn<LongColumn,Long>public LongColumn createCol(String name)
createCol in class NumberColumn<LongColumn,Long>public static LongColumn indexColumn(String columnName, int size, int startsWith)
public String getString(int row)
ColumngetString in interface Column<Long>getString in class NumberColumn<LongColumn,Long>row - The index of the row.public static boolean valueIsMissing(long value)
public int size()
size in interface Column<Long>size in interface NumberFilterssize in interface NumberMapFunctionspublic LongColumn subset(int[] rows)
subset in interface Column<Long>subset in class AbstractColumn<LongColumn,Long>public LongColumn unique()
Columnpublic LongColumn top(int n)
NumberColumntop in class NumberColumn<LongColumn,Long>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 LongColumn bottom(int n)
NumberColumnbottom in class NumberColumn<LongColumn,Long>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 LongColumn lag(int n)
ColumnFor example if you lag a column containing 2, 3, 4 by 1, you get a column containing NA, 2, 3
public LongColumn removeMissing()
removeMissing in interface Column<Long>public LongColumn append(long i)
public LongColumn append(Long val)
public LongColumn copy()
Columncopy in interface NumericColumn<Long>copy in interface Column<Long>copy in class NumberColumn<LongColumn,Long>Columnpublic long[] asLongArray()
public DateTimeColumn asDateTimes(ZoneOffset offset)
The values in this column must be longs that represent the time in milliseconds from the epoch as in standard Java date/time calculations
offset - The ZoneOffset to use in the calculationpublic Long[] asObjectArray()
asObjectArray in interface Column<Long>public int compare(Long o1, Long o2)
compare in interface Comparator<Long>public LongColumn set(int i, Long val)
public LongColumn set(int i, long val)
public Column<Long> set(int row, String stringValue, AbstractColumnParser<?> parser)
public LongColumn append(Column<Long> column, int row)
public LongColumn set(int row, Column<Long> column, int sourceRow)
public LongColumn appendMissing()
ColumnappendMissing in interface Column<Long>appendMissing in class NumberColumn<LongColumn,Long>public byte[] asBytes(int rowNumber)
NumberColumnasBytes in interface Column<Long>asBytes in class NumberColumn<LongColumn,Long>rowNumber - index of the rowpublic int countUnique()
ColumncountUnique in interface Column<Long>public long getLong(int row)
Returns the closest int to the argument, with ties rounding to positive infinity.
Special cases:
Special cases:
Integer.MAX_VALUE, an error will be thrown
row - the index of the value to be rounded to an integer.int value.ClassCastException - if the absolute value of the value to be rounded is too large to be
cast to an intpublic double getDouble(int row)
getDouble in interface NumericColumn<Long>getDouble in interface NumberFiltersgetDouble in interface NumberMapFunctionspublic boolean isMissingValue(long value)
public boolean isMissing(int rowNumber)
isMissing in interface Column<Long>isMissing in interface NumberMapFunctionspublic Column<Long> setMissing(int i)
setMissing in interface Column<Long>public void sortAscending()
sortAscending in interface Column<Long>public void sortDescending()
sortDescending in interface Column<Long>public LongColumn appendObj(Object obj)
public LongColumn appendCell(String value)
appendCell in interface Column<Long>public LongColumn appendCell(String value, AbstractColumnParser<?> parser)
appendCell in interface Column<Long>public String getUnformattedString(int row)
getUnformattedString in interface Column<Long>public Table countByCategory()
countByCategory in interface CategoricalColumn<Long>public IntColumn asIntColumn()
A narrowing conversion of a signed integer to an integral type T simply discards all but the n lowest order bits, where n is the number of bits used to represent type T. In addition to a possible loss of information about the magnitude of the numeric value, this may cause the sign of the resulting value to differ from the sign of the input value.
In other words, if the element being converted is larger (or smaller) than Integer.MAX_VALUE (or Integer.MIN_VALUE) you will not get a conventionally good conversion.
Despite the fact that overflow, underflow, or other loss of information may occur, a narrowing primitive conversion never results in a run-time exception.
A missing value in the receiver is converted to a missing value in the result
asIntColumn in interface NumericColumn<Long>public ShortColumn asShortColumn()
A narrowing conversion of a signed long to an integral type T simply discards all but the n lowest order bits, where n is the number of bits used to represent type T. In addition to a possible loss of information about the magnitude of the numeric value, this may cause the sign of the resulting value to differ from the sign of the input value.
In other words, if the element being converted is larger (or smaller) than Short.MAX_VALUE (or Short.MIN_VALUE) you will not get a conventionally good conversion.
Despite the fact that overflow, underflow, or other loss of information may occur, a narrowing primitive conversion never results in a run-time exception.
A missing value in the receiver is converted to a missing value in the result
asShortColumn in interface NumericColumn<Long>public FloatColumn asFloatColumn()
A widening primitive conversion from a long to a float does not lose information about the overall magnitude of a numeric value. It may, however, result in loss of precision - that is, the result may lose some of the least significant bits of the value. In this case, the resulting floating-point value will be a correctly rounded version of the integer value, using IEEE 754 round-to-nearest mode.
Despite the fact that a loss of precision may occur, a widening primitive conversion never results in a run-time exception.
A missing value in the receiver is converted to a missing value in the result
asFloatColumn in interface NumericColumn<Long>public DoubleColumn asDoubleColumn()
A widening primitive conversion from a long to a double does not lose information about the overall magnitude of a numeric value. It may, however, result in loss of precision - that is, the result may lose some of the least significant bits of the value. In this case, the resulting floating-point value will be a correctly rounded version of the integer value, using IEEE 754 round-to-nearest mode.
Despite the fact that a loss of precision may occur, a widening primitive conversion never results in a run-time exception.
A missing value in the receiver is converted to a missing value in the result
asDoubleColumn in interface NumericColumn<Long>Copyright © 2020. All rights reserved.