public abstract class IndexMap
extends java.lang.Object
Efficiently maps each integer in a set to another integer in a set, useful for merging bulk write errors when a bulk write must be split into multiple batches. Has the ability to switch from a range-based to a hash-based map depending on the mappings that have been added.
This class should not be considered a part of the public API.
| Constructor and Description |
|---|
IndexMap() |
| Modifier and Type | Method and Description |
|---|---|
abstract IndexMap |
add(int index,
int originalIndex)
Add a new index to the map
|
static IndexMap |
create()
Create an empty index map.
|
static IndexMap |
create(int startIndex,
int count)
Create an index map that maps the integers 0..count to startIndex..startIndex + count.
|
abstract int |
map(int index)
Return the index that the specified index is mapped to.
|
public static IndexMap create()
public static IndexMap create(int startIndex, int count)
startIndex - the start indexcount - the countpublic abstract IndexMap add(int index, int originalIndex)
index - the indexoriginalIndex - the original indexpublic abstract int map(int index)
index - the indexCopyright © 2010 - 2023 Adobe. All Rights Reserved