public class BooleanColumn extends AbstractColumn implements BooleanMapUtils, IntConvertibleColumn
| Modifier and Type | Field and Description |
|---|---|
static byte |
MISSING_VALUE |
| Constructor and Description |
|---|
BooleanColumn(ColumnMetadata metadata) |
BooleanColumn(String name) |
BooleanColumn(String name,
boolean[] array) |
BooleanColumn(String name,
int initialSize) |
BooleanColumn(String name,
Selection hits,
int columnSize) |
| Modifier and Type | Method and Description |
|---|---|
void |
append(boolean b) |
void |
append(byte b) |
void |
append(Column column) |
void |
appendCell(String object) |
byte[] |
asBytes(int row)
Returns the contents of the cell at rowNumber as a byte[].
|
double[] |
asDoubleArray() |
int[] |
asIntArray() |
IntColumn |
asIntColumn() |
it.unimi.dsi.fastutil.booleans.BooleanSet |
asSet() |
it.unimi.dsi.fastutil.bytes.ByteIterator |
byteIterator() |
int |
byteSize()
Returns the width of a cell in this column, in bytes.
|
void |
clear() |
boolean |
contains(boolean aBoolean) |
static byte |
convert(String stringValue) |
BooleanColumn |
copy()
Returns a deep copy of the receiver
|
int |
countFalse() |
int |
countMissing()
Returns the count of missing values in this column
|
int |
countTrue() |
int |
countUnique()
Returns the count of unique values in this column.
|
it.unimi.dsi.fastutil.bytes.ByteArrayList |
data()
Returns a ByteArrayList containing 0 (false), 1 (true) or Byte.MIN_VALUE (missing)
|
BooleanColumn |
emptyCopy()
Returns a copy of the receiver with no data.
|
BooleanColumn |
emptyCopy(int rowSize)
Returns an empty copy of the receiver, with its internal storage initialized to the given row size.
|
boolean |
equals(Object o) |
Boolean |
get(int i)
Returns the value in row i as a Boolean
|
byte |
getByte(int i)
Returns the value in row i as a byte (0, 1, or Byte.MIN_VALUE representing missing data)
|
String |
getString(int row)
Returns a string representation of the value at the given row.
|
int |
hashCode() |
boolean |
isEmpty()
Returns true if the column has no data
|
Selection |
isEqualTo(BooleanColumn other) |
Selection |
isFalse() |
Selection |
isMissing() |
Selection |
isNotMissing() |
Selection |
isTrue() |
Iterator<Boolean> |
iterator() |
String |
print() |
it.unimi.dsi.fastutil.ints.IntComparator |
rowComparator() |
Selection |
select(BooleanPredicate predicate) |
void |
set(boolean newValue,
Selection rowSelection)
Conditionally update this column, replacing current values with newValue for all rows where the current value
matches the selection criteria
|
void |
set(int i,
boolean b) |
int |
size() |
void |
sortAscending() |
void |
sortDescending() |
Table |
summary() |
String |
toString() |
ColumnType |
type()
Returns this column's ColumnType
|
BooleanColumn |
unique()
Returns a column of the same type as the receiver, containing only the unique values of the receiver.
|
columnMetadata, columnWidth, comment, difference, id, metadata, name, setComment, setNameclone, finalize, getClass, notify, notifyAll, wait, wait, waitand, orcolumnMetadata, columnWidth, comment, difference, first, first, id, last, last, metadata, name, rolling, setComment, setName, subset, titleasIntegerSetpublic static final byte MISSING_VALUE
public BooleanColumn(ColumnMetadata metadata)
public BooleanColumn(String name)
public BooleanColumn(String name, int initialSize)
public BooleanColumn(String name, boolean[] array)
public static byte convert(String stringValue)
public int countMissing()
countMissing in interface Columnpublic int countUnique()
ColumncountUnique in interface Columnpublic BooleanColumn unique()
Columnpublic ColumnType type()
Columntype in interface ColumnColumnTypepublic void append(boolean b)
public void append(byte b)
public String getString(int row)
Columnpublic BooleanColumn emptyCopy()
Columnpublic BooleanColumn emptyCopy(int rowSize)
Columnpublic BooleanColumn copy()
Columnpublic void sortAscending()
sortAscending in interface Columnpublic void sortDescending()
sortDescending in interface Columnpublic void appendCell(String object)
appendCell in interface ColumnappendCell in class AbstractColumnpublic Boolean get(int i)
i - the row numberpublic byte getByte(int i)
i - the row numberpublic boolean isEmpty()
Columnpublic int countTrue()
public int countFalse()
public Selection isFalse()
public Selection isTrue()
public Selection isEqualTo(BooleanColumn other)
public it.unimi.dsi.fastutil.bytes.ByteArrayList data()
public void set(int i,
boolean b)
public void set(boolean newValue,
Selection rowSelection)
public it.unimi.dsi.fastutil.ints.IntComparator rowComparator()
rowComparator in interface Columnpublic double[] asDoubleArray()
asDoubleArray in interface Columnpublic Selection isNotMissing()
isNotMissing in interface Columnpublic it.unimi.dsi.fastutil.bytes.ByteIterator byteIterator()
public it.unimi.dsi.fastutil.booleans.BooleanSet asSet()
public boolean contains(boolean aBoolean)
public int byteSize()
Columnpublic byte[] asBytes(int row)
Columnpublic Selection select(BooleanPredicate predicate)
public int[] asIntArray()
asIntArray in interface IntConvertibleColumnpublic IntColumn asIntColumn()
Copyright © 2018. All rights reserved.