public class BooleanColumn extends AbstractColumn implements BooleanMapUtils
| Modifier and Type | Field and Description |
|---|---|
static byte |
MISSING_VALUE |
| Constructor and Description |
|---|
BooleanColumn(ColumnMetadata metadata) |
BooleanColumn(java.lang.String name,
int initialSize) |
BooleanColumn(java.lang.String name,
Selection hits,
int columnSize) |
| Modifier and Type | Method and Description |
|---|---|
void |
add(boolean b) |
void |
add(byte b) |
void |
addCell(java.lang.String object) |
void |
append(Column column) |
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 boolean |
convert(java.lang.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
|
static BooleanColumn |
create(java.lang.String name) |
static BooleanColumn |
create(java.lang.String fileName,
it.unimi.dsi.fastutil.bytes.ByteArrayList bools) |
static BooleanColumn |
create(java.lang.String name,
int rowSize) |
static BooleanColumn |
create(java.lang.String name,
Selection selection,
int rowSize) |
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
|
java.lang.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)
|
java.lang.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() |
java.util.Iterator<java.lang.Boolean> |
iterator() |
java.lang.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() |
int[] |
toIntArray() |
IntColumn |
toIntColumn() |
java.lang.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, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitand, orcolumnMetadata, columnWidth, comment, difference, first, first, id, last, last, metadata, name, setComment, setName, subset, title, toDoubleArraypublic static final byte MISSING_VALUE
public BooleanColumn(ColumnMetadata metadata)
public BooleanColumn(java.lang.String name,
int initialSize)
public BooleanColumn(java.lang.String name,
Selection hits,
int columnSize)
public static BooleanColumn create(java.lang.String name)
public static BooleanColumn create(java.lang.String name, int rowSize)
public static BooleanColumn create(java.lang.String name, Selection selection, int rowSize)
public int countMissing()
countMissing in interface Columnpublic int countUnique()
ColumncountUnique in interface Columnpublic BooleanColumn unique()
Columnpublic ColumnType type()
Columnpublic void add(boolean b)
public void add(byte b)
public java.lang.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 static boolean convert(java.lang.String stringValue)
public void addCell(java.lang.String object)
addCell in interface ColumnaddCell in class AbstractColumnpublic java.lang.Boolean get(int i)
i - the row numberpublic byte getByte(int i)
i - the row numberpublic boolean isEmpty()
Columnpublic static BooleanColumn create(java.lang.String fileName, it.unimi.dsi.fastutil.bytes.ByteArrayList bools)
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 Columnpublic Selection isNotMissing()
isNotMissing in interface Columnpublic java.util.Iterator<java.lang.Boolean> iterator()
public it.unimi.dsi.fastutil.bytes.ByteIterator byteIterator()
public java.lang.String toString()
toString in class java.lang.Objectpublic 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[] toIntArray()
public IntColumn toIntColumn()