Package com.mckoi.database
Class IndexStore.IndexIntegerList
- java.lang.Object
-
- com.mckoi.util.AbstractBlockIntegerList
-
- com.mckoi.database.IndexStore.IndexIntegerList
-
- All Implemented Interfaces:
IntegerListInterface
- Enclosing class:
- IndexStore
private final class IndexStore.IndexIntegerList extends AbstractBlockIntegerList
The IntegerListInterface implementation that is used to represent a mutable snapshop of the indices at a given point in time.
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.ArrayListdeleted_blocksThe mapped elements that were deleted.private booleandisposedSet to true when disposed.private intindex_numThe number of the index in the store that this list represents.-
Fields inherited from class com.mckoi.util.AbstractBlockIntegerList
block_list
-
-
Constructor Summary
Constructors Constructor Description IndexIntegerList(int index_num, IndexStore.MappedListBlock[] blocks)Constructs the list with the given set of blocks.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voiddeleteListBlock(IntegerListBlockInterface list_block)We must maintain a list of deleted blocks.voiddispose()IndexStore.MappedListBlock[]getAllBlocks()Returns the array of all MappedListBlock that are in this list.IndexStore.MappedListBlock[]getDeletedBlocks()Returns the array of all MappedListBlock that were deleted from this list.intgetIndexNumber()Returns the index number of this list.protected IntegerListBlockInterfacenewListBlock()Creates a new block for the list.-
Methods inherited from class com.mckoi.util.AbstractBlockIntegerList
add, add, checkSorted, checkSorted, contains, contains, get, insertSort, insertSort, isImmutable, iterator, iterator, remove, removeFromBlock, removeSort, removeSort, searchFirst, searchLast, setImmutable, size, toString, uniqueInsertSort
-
-
-
-
Constructor Detail
-
IndexIntegerList
public IndexIntegerList(int index_num, IndexStore.MappedListBlock[] blocks)Constructs the list with the given set of blocks.
-
-
Method Detail
-
newListBlock
protected IntegerListBlockInterface newListBlock()
Creates a new block for the list.- Specified by:
newListBlockin classAbstractBlockIntegerList
-
deleteListBlock
protected void deleteListBlock(IntegerListBlockInterface list_block)
We must maintain a list of deleted blocks.- Overrides:
deleteListBlockin classAbstractBlockIntegerList
-
getIndexNumber
public int getIndexNumber()
Returns the index number of this list.
-
getAllBlocks
public IndexStore.MappedListBlock[] getAllBlocks()
Returns the array of all MappedListBlock that are in this list.
-
getDeletedBlocks
public IndexStore.MappedListBlock[] getDeletedBlocks()
Returns the array of all MappedListBlock that were deleted from this list.
-
dispose
public void dispose()
-
-