T
- Field type used for sorting block Idspublic class SortedBlockSet<T extends BlockSortedField> extends Object
Constructor and Description |
---|
SortedBlockSet()
Creates a new sorted block set.
|
Modifier and Type | Method and Description |
---|---|
Iterator<Pair<Long,T>> |
getAscendingIterator() |
Iterator<Pair<Long,T>> |
getDescendingIterator() |
T |
getSortField(long blockId)
Used to get the current sort field for a block Id.
|
void |
put(long blockId,
T sortedField)
Updates or inserts the collection with new block Id.
|
void |
remove(long blockId)
Removes a block id from the collection.
|
int |
size() |
public T getSortField(long blockId)
blockId
- block Idpublic void put(long blockId, T sortedField)
blockId
- block idsortedField
- sorted field for the block idpublic void remove(long blockId)
blockId
- block idpublic int size()
public Iterator<Pair<Long,T>> getAscendingIterator()
Copyright © 2023. All Rights Reserved.