|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectstorage.primitiveStorage.PrimitiveStorageManager.ChunksTable
This class represents the chunk's table, i.e. a set of number-chunk pairs. This class uses a AA-Tree for implementing the table.
Nested Class Summary | |
class |
PrimitiveStorageManager.ChunksTable.Entry
Represents a number-chunk pair. |
Constructor Summary | |
PrimitiveStorageManager.ChunksTable()
Constructs an empty chunk's table. |
Method Summary | |
boolean |
containsChunkNumber(int chunkNumber)
Checks if a chunk with a given number exists in the table. |
PrimitiveStorageManager.Chunk |
get(int chunkNumber)
Returns the chunk with the specified number. |
PrimitiveStorageManager.ChunksTable.Entry |
getEntry(int chunkNumber)
Returns the number-chunk pair with the specified number. |
PrimitiveStorageManager.ChunksTable.Entry |
getFirst()
Returns the first inserted number-chunk pair. |
PrimitiveStorageManager.ChunksTable.Entry |
getLast()
Returns the last inserted number-chunk pair. |
void |
put(int chunkNumber,
PrimitiveStorageManager.Chunk chunk)
Puts a chunk with a specified number in the table. |
void |
remove(int chunkNumber)
Removes a chunk with a specified number from the table. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public PrimitiveStorageManager.ChunksTable()
Method Detail |
public boolean containsChunkNumber(int chunkNumber)
chunkNumber
- The chunk number to find in the table.
true
if a chunk with the given number is
in the table, false
otherwise.public PrimitiveStorageManager.Chunk get(int chunkNumber)
chunkNumber
- The chunk number to find in the table.
null
if the number does not exist.public PrimitiveStorageManager.ChunksTable.Entry getEntry(int chunkNumber)
chunkNumber
- The chunk number to find in the table.
null
if the number does not exist.public void put(int chunkNumber, PrimitiveStorageManager.Chunk chunk)
chunkNumber
- The chunk number to put.chunk
- The chunk to put.public void remove(int chunkNumber)
chunkNumber
- The number of the chunk to remove.public PrimitiveStorageManager.ChunksTable.Entry getFirst()
null
if there are not inserted chunks.public PrimitiveStorageManager.ChunksTable.Entry getLast()
null
if there are not inserted chunks.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |