Package com.mckoi.database
Class IndexSetStore.IndexIntegerList
- java.lang.Object
-
- com.mckoi.util.AbstractBlockIntegerList
-
- com.mckoi.database.IndexSetStore.IndexIntegerList
-
- All Implemented Interfaces:
IntegerListInterface
- Enclosing class:
- IndexSetStore
private final class IndexSetStore.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.private intmax_block_sizeThe maximum block size.-
Fields inherited from class com.mckoi.util.AbstractBlockIntegerList
block_list
-
-
Constructor Summary
Constructors Constructor Description IndexIntegerList(int index_num, int max_block_size, IndexSetStore.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()IndexSetStore.MappedListBlock[]getAllBlocks()Returns the array of all MappedListBlock that are in this list.IndexSetStore.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
-
-
-
-
Field Detail
-
index_num
private int index_num
The number of the index in the store that this list represents.
-
max_block_size
private int max_block_size
The maximum block size.
-
disposed
private boolean disposed
Set to true when disposed.
-
deleted_blocks
private java.util.ArrayList deleted_blocks
The mapped elements that were deleted.
-
-
Constructor Detail
-
IndexIntegerList
public IndexIntegerList(int index_num, int max_block_size, IndexSetStore.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 IndexSetStore.MappedListBlock[] getAllBlocks()
Returns the array of all MappedListBlock that are in this list.
-
getDeletedBlocks
public IndexSetStore.MappedListBlock[] getDeletedBlocks()
Returns the array of all MappedListBlock that were deleted from this list.
-
dispose
public void dispose()
-
-