public abstract class IntegerListBlockInterface extends Object
An IntegerListBlockInterface is a single element of a block of integers that make up some complete list of integers. A block integer list encapsulates a set of integers making up the block, and a chain to the next and previous block in the set.
Modifier and Type | Field and Description |
---|---|
IntegerListBlockInterface |
next
The next block in the chain.
|
IntegerListBlockInterface |
previous
The previous block in the chain.
|
Constructor and Description |
---|
IntegerListBlockInterface() |
Modifier and Type | Method and Description |
---|---|
abstract void |
addInt(int val)
Adds an int to the block.
|
abstract int |
binarySearch(Object key,
IndexComparator c)
Considers each int a reference to another structure, and the block
sorted by these structures.
|
abstract int |
bottomInt()
The bottom int in the list.
|
abstract boolean |
canContain(int number)
Returns true if the block has enough room to fill with the given number
of integers.
|
abstract void |
clear()
Clears the object to be re-used.
|
abstract int |
copyTo(int[] to,
int offset)
Copies all the data from this block into the given int[] array.
|
abstract void |
copyTo(IntegerListBlockInterface dest_block)
Copies all the data from this block into the given destination block.
|
boolean |
hasChanged()
Returns true if this store has been modified.
|
abstract void |
insertIntAt(int val,
int pos)
Inserts an int at the given position.
|
abstract int |
intAt(int pos)
Returns the int at the given position in the array.
|
abstract boolean |
isEmpty()
Returns true if the block is empty.
|
abstract boolean |
isFull()
Returns true if the block is full.
|
abstract int |
iterativeSearch(int val)
Performs an iterative search through the int values in the list.
|
abstract int |
iterativeSearch(int val,
int position)
Performs an iterative search from the given position to the end of
the list in the block.
|
abstract void |
moveTo(IntegerListBlockInterface dest_block,
int dest_index,
int length)
Moves a set of values from the end of this block and inserts it into the
given block at the destination index specified.
|
abstract int |
removeIntAt(int pos)
Removes an Int from the specified position in the block.
|
abstract int |
searchFirst(int val)
Assuming a sorted block, finds the first index in the block that
equals the given value.
|
abstract int |
searchFirst(Object key,
IndexComparator c)
Considers each int a reference to another structure, and the block
sorted by these structures.
|
abstract int |
searchLast(int val)
Assuming a sorted block, finds the first index in the block that
equals the given value.
|
abstract int |
searchLast(Object key,
IndexComparator c)
Considers each int a reference to another structure, and the block
sorted by these structures.
|
abstract int |
setIntAt(int val,
int pos)
Sets an int at the given position, overwriting anything that was
previously there.
|
abstract int |
size()
Returns the number of entries in this block.
|
abstract int |
topInt()
The top int in the list.
|
public IntegerListBlockInterface next
public IntegerListBlockInterface previous
public final boolean hasChanged()
public abstract int size()
public abstract boolean isFull()
public abstract boolean isEmpty()
public abstract boolean canContain(int number)
public abstract int topInt()
public abstract int bottomInt()
public abstract int intAt(int pos)
public abstract void addInt(int val)
public abstract int removeIntAt(int pos)
public abstract void insertIntAt(int val, int pos)
public abstract int setIntAt(int val, int pos)
public abstract void moveTo(IntegerListBlockInterface dest_block, int dest_index, int length)
public abstract void copyTo(IntegerListBlockInterface dest_block)
public abstract int copyTo(int[] to, int offset)
public abstract void clear()
public abstract int iterativeSearch(int val)
public abstract int iterativeSearch(int val, int position)
public abstract int binarySearch(Object key, IndexComparator c)
public abstract int searchFirst(Object key, IndexComparator c)
public abstract int searchLast(Object key, IndexComparator c)
public abstract int searchFirst(int val)
public abstract int searchLast(int val)
Copyright © 2015. All rights reserved.