Package tech.tablesaw.columns.strings
Interface DictionaryMap
- All Known Implementing Classes:
ByteDictionaryMap
,IntDictionaryMap
,ShortDictionaryMap
public interface DictionaryMap
Interface implemented by the objects that perform the dictionary encoding of the Strings in
StringColumn, as well as the primitive values that represent the individual instances of the
String in the column.
-
Method Summary
Modifier and TypeMethodDescriptionvoid
void
byte[]
asBytes
(int rowNumber) Returns the contents of the cell at rowNumber as a byte[]default int[]
String[]
asSet()
void
clear()
countByCategory
(String columnName) int
Returns the count of missing values in this columnint
countOccurrences
(String value) int
int
firstIndexOf
(String string) int
getKeyAtIndex
(int rowNumber) Returns the int that represents the string at rowNumberint
getKeyForIndex
(int i) getValueForIndex
(int rowIndex) getValueForKey
(int key) boolean
isMissing
(int rowNumber) default Selection
isNotEqualTo
(String string) iterator()
int
selectIsIn
(String... strings) selectIsIn
(Collection<String> strings) void
int
size()
void
void
default int
uniqueValuesAt
(int index) Returns the number of unique values at or before the given index
-
Method Details
-
sortDescending
void sortDescending() -
sortAscending
void sortAscending() -
getKeyAtIndex
int getKeyAtIndex(int rowNumber) Returns the int that represents the string at rowNumber -
getValueForKey
-
size
int size() -
getValueForIndex
-
countOccurrences
-
asSet
-
uniqueValuesAt
default int uniqueValuesAt(int index) Returns the number of unique values at or before the given index -
asIntArray
default int[] asIntArray() -
getKeyForIndex
int getKeyForIndex(int i) -
firstIndexOf
-
asObjectArray
String[] asObjectArray() -
selectIsIn
-
selectIsIn
-
append
- Throws:
NoKeysAvailableException
-
set
- Throws:
NoKeysAvailableException
-
clear
void clear() -
countUnique
int countUnique() -
countByCategory
-
isEqualTo
-
isNotEqualTo
-
getDummies
List<BooleanColumn> getDummies() -
asBytes
byte[] asBytes(int rowNumber) Returns the contents of the cell at rowNumber as a byte[] -
countMissing
int countMissing()Returns the count of missing values in this column -
iterator
-
appendMissing
void appendMissing() -
isMissing
boolean isMissing(int rowNumber) -
promoteYourself
DictionaryMap promoteYourself() -
nextKeyWithoutIncrementing
int nextKeyWithoutIncrementing()
-