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,
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[].
|
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 |
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.
|
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(int i,
boolean b) |
int |
size() |
void |
sortAscending() |
void |
sortDescending() |
Table |
summary() |
double[] |
toDoubleArray() |
int[] |
toIntArray() |
IntColumn |
toIntColumn() |
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, setName
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
and, or
columnMetadata, columnWidth, comment, difference, first, first, id, last, last, metadata, name, rolling, setComment, setName, subset, title
asIntegerSet
public static final byte MISSING_VALUE
public BooleanColumn(ColumnMetadata metadata)
public BooleanColumn(String name)
public BooleanColumn(String name, int initialSize)
public static byte convert(String stringValue)
public int countMissing()
countMissing
in interface Column
public int countUnique()
Column
countUnique
in interface Column
public BooleanColumn unique()
Column
public ColumnType type()
Column
type
in interface Column
ColumnType
public void append(boolean b)
public void append(byte b)
public String getString(int row)
Column
public BooleanColumn emptyCopy()
Column
public BooleanColumn emptyCopy(int rowSize)
Column
public BooleanColumn copy()
Column
public void sortAscending()
sortAscending
in interface Column
public void sortDescending()
sortDescending
in interface Column
public void appendCell(String object)
appendCell
in interface Column
appendCell
in class AbstractColumn
public Boolean get(int i)
i
- the row numberpublic byte getByte(int i)
i
- the row numberpublic boolean isEmpty()
Column
public 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 it.unimi.dsi.fastutil.ints.IntComparator rowComparator()
rowComparator
in interface Column
public double[] toDoubleArray()
toDoubleArray
in interface Column
public Selection isNotMissing()
isNotMissing
in interface Column
public it.unimi.dsi.fastutil.bytes.ByteIterator byteIterator()
public it.unimi.dsi.fastutil.booleans.BooleanSet asSet()
public boolean contains(boolean aBoolean)
public int byteSize()
Column
public byte[] asBytes(int row)
Column
public Selection select(BooleanPredicate predicate)
public int[] toIntArray()
toIntArray
in interface IntConvertibleColumn
public IntColumn toIntColumn()
Copyright © 2017. All rights reserved.