Package com.mckoi.util
Class BlockIntegerList
- java.lang.Object
-
- com.mckoi.util.AbstractBlockIntegerList
-
- com.mckoi.util.BlockIntegerList
-
- All Implemented Interfaces:
IntegerListInterface
public class BlockIntegerList extends AbstractBlockIntegerList
An implementation of AbstractBlockIntegerList that stores all int values in blocks that are entirely stored in main memory. This type of structure is useful for large in-memory lists in which add/remove performance must be fast.- Author:
- Tobias Downer
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
BlockIntegerList.IntArrayListBlock
The block that contains the actual int values of the list.
-
Field Summary
-
Fields inherited from class com.mckoi.util.AbstractBlockIntegerList
block_list
-
-
Constructor Summary
Constructors Constructor Description BlockIntegerList()
Constructs the list.BlockIntegerList(IntegerListInterface i_list)
Copies the information from the given BlockIntegerList into a new object and performs a deep clone of the information in this container.BlockIntegerList(IntegerVector ivec)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
deleteListBlock(IntegerListBlockInterface list_block)
Called when the class decides this ListBlock is no longer needed.protected IntegerListBlockInterface
newListBlock()
Creates a new ListBlock to fill with ints.-
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
-
BlockIntegerList
public BlockIntegerList()
Constructs the list.
-
BlockIntegerList
public BlockIntegerList(IntegerVector ivec)
-
BlockIntegerList
public BlockIntegerList(IntegerListInterface i_list)
Copies the information from the given BlockIntegerList into a new object and performs a deep clone of the information in this container.
-
-
Method Detail
-
newListBlock
protected IntegerListBlockInterface newListBlock()
Creates a new ListBlock to fill with ints.- Specified by:
newListBlock
in classAbstractBlockIntegerList
-
deleteListBlock
protected void deleteListBlock(IntegerListBlockInterface list_block)
Called when the class decides this ListBlock is no longer needed. Provided as an event for derived classes to intercept.- Overrides:
deleteListBlock
in classAbstractBlockIntegerList
-
-