KEY - Type of dataset class keyDATASET - Type of sub-datasets.INSTANCE - Type of instances in the datasetpublic interface GroupedDataset<KEY,DATASET extends Dataset<INSTANCE>,INSTANCE> extends Dataset<INSTANCE>, Map<KEY,DATASET>
Dataset that is grouped into separate classes or groups. Each group
is represented by a key, and each key corresponds to a sub-dataset.
Sub-datasets can be any kind of Dataset, including
GroupedDatasets, so it is possible to build tree structures.
| Modifier and Type | Method and Description |
|---|---|
Set<KEY> |
getGroups()
Get the set of all defined group keys.
|
DATASET |
getInstances(KEY key)
Get sub-dataset corresponding to the given group key
|
INSTANCE |
getRandomInstance(KEY key)
Get a random instance from the sub-dataset corresponding to a specific
group.
|
getRandomInstance, numInstancesforEach, iterator, spliteratorclear, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, equals, forEach, get, getOrDefault, hashCode, isEmpty, keySet, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, size, valuesDATASET getInstances(KEY key)
key - the key.Set<KEY> getGroups()
INSTANCE getRandomInstance(KEY key)
key - the group key