public class SlotAllocatorForIndexRanges<T extends HasIndices> extends SlotAllocatorForSequences<java.lang.Integer>
| Modifier and Type | Field and Description |
|---|---|
protected java.util.Map<T,java.lang.Integer> |
slots
Each element has one slot map attached to it.
|
| Constructor and Description |
|---|
SlotAllocatorForIndexRanges()
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
void |
allocate(java.util.Collection<T> elements)
Allocate slots and cache them
|
private void |
allocateSlot(T element)
Allocate slot
|
int |
getSlot(T element)
Get element's slot from cache
|
allocateSlot, getMaxSlotprotected final java.util.Map<T extends HasIndices,java.lang.Integer> slots
public void allocate(java.util.Collection<T> elements)
elements - elements in rangepublic int getSlot(T element)
element - element to get slot ofprivate void allocateSlot(T element)
element - element