Package com.mckoi.util
Class BlockIntegerList
java.lang.Object
com.mckoi.util.AbstractBlockIntegerList
com.mckoi.util.BlockIntegerList
- All Implemented Interfaces:
IntegerListInterface
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 ClassesModifier and TypeClassDescriptionstatic class
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
ConstructorsConstructorDescriptionConstructs 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. -
Method Summary
Modifier and TypeMethodDescriptionprotected void
deleteListBlock
(IntegerListBlockInterface list_block) Called when the class decides this ListBlock is no longer needed.protected IntegerListBlockInterface
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 Details
-
BlockIntegerList
public BlockIntegerList()Constructs the list. -
BlockIntegerList
-
BlockIntegerList
Copies the information from the given BlockIntegerList into a new object and performs a deep clone of the information in this container.
-
-
Method Details
-
newListBlock
Creates a new ListBlock to fill with ints.- Specified by:
newListBlock
in classAbstractBlockIntegerList
-
deleteListBlock
Called when the class decides this ListBlock is no longer needed. Provided as an event for derived classes to intercept.- Overrides:
deleteListBlock
in classAbstractBlockIntegerList
-