org.axiondb.engine.rowcollection

Class IntRowMap

public class IntRowMap extends IntHashMap

Int key and Row value Map, this does not implement java.util.Map interface and has limited Map like API. Does not implement EntrySet and and KeySet, tather it just retunds their iterator.

Version: $Revision: 1.5 $ $Date: 2005/12/23 01:32:24 $

Author: Ahimanikya Satapathy

Constructor Summary
IntRowMap()
Creates an IntRowMap of small initial capacity.
IntRowMap(int capacity)
Creates an IntRowMap of specified initial capacity.
IntRowMap(IntRowMap map)
Creates a IntRowMap containing the specified entries, in the order they are returned by the map's iterator.
Method Summary
voidaddIndex(Index index)
RowaddRow(Table table, Row row)
voidclear()
Removes all mappings from this IntRowMap.
voidclearIndexes()
RowdeleteRow(Table table, Row deleted)
RowIteratorgetIndexedRows(Table source, Selectable node, boolean readOnly)
IndexgetIndexForColumn(Column column)
RowgetRow(int key)
Returns the value to which this IntRowMapmaps the specified key.
booleanisColumnIndexed(Column column)
voidpopulateIndex(Table table, Index index)
RowputRow(int key, Row value)
Associates the specified value with the specified key in this IntRowMap.
RowremoveRow(int key)
Removes the mapping for this key from this IntRowMapif present.
RowIteratorrowIterator()
Returns a list iterator over the values in this list in proper sequence, (this map maintains the insertion order).
RowCollectionrowValues()
Returns a RowCollectionview of the values contained in this IntRowMap.
voidshutdown()
voidtruncateIndices()
RowupdateRow(Table table, Row oldrow, Row newrow)

Constructor Detail

IntRowMap

public IntRowMap()
Creates an IntRowMap of small initial capacity.

IntRowMap

public IntRowMap(int capacity)
Creates an IntRowMap of specified initial capacity. Unless the map size exceeds the specified capacity no memory allocation is ever performed.

Parameters: capacity the initial capacity.

IntRowMap

public IntRowMap(IntRowMap map)
Creates a IntRowMap containing the specified entries, in the order they are returned by the map's iterator.

Parameters: map the map whose entries are to be placed into this map.

Method Detail

addIndex

public final void addIndex(Index index)

addRow

public Row addRow(Table table, Row row)

clear

public void clear()
Removes all mappings from this IntRowMap.

clearIndexes

public final void clearIndexes()

deleteRow

public Row deleteRow(Table table, Row deleted)

getIndexedRows

public RowIterator getIndexedRows(Table source, Selectable node, boolean readOnly)

getIndexForColumn

public Index getIndexForColumn(Column column)

getRow

public final Row getRow(int key)
Returns the value to which this IntRowMapmaps the specified key.

Parameters: key the key whose associated value is to be returned.

Returns: the value to which this map maps the specified key, or null if there is no mapping for the key.

isColumnIndexed

public boolean isColumnIndexed(Column column)

populateIndex

public void populateIndex(Table table, Index index)

putRow

public final Row putRow(int key, Row value)
Associates the specified value with the specified key in this IntRowMap. If the IntRowMappreviously contained a mapping for this key, the old value is replaced.

Parameters: key the key with which the specified value is to be associated. value the value to be associated with the specified key.

Returns: the previous value associated with specified key, or null if there was no mapping for key. A null return can also indicate that the map previously associated null with the specified key.

removeRow

public final Row removeRow(int key)
Removes the mapping for this key from this IntRowMapif present.

Parameters: key the key whose mapping is to be removed from the map.

Returns: previous value associated with specified key, or null if there was no mapping for key. A null return can also indicate that the map previously associated null with the specified key.

rowIterator

public final RowIterator rowIterator()
Returns a list iterator over the values in this list in proper sequence, (this map maintains the insertion order).

Returns: a list iterator of the values in this list (in proper sequence).

rowValues

public final RowCollection rowValues()
Returns a RowCollectionview of the values contained in this IntRowMap. The collection is backed by the map, so changes to the map are reflected in the collection, and vice-versa. The collection supports element removal, which removes the corresponding mapping from this map, via the RowIterator.remove,RowCollection.remove and clear operations.

Returns: a row collection view of the values contained in this map.

shutdown

public void shutdown()

truncateIndices

public void truncateIndices()

updateRow

public Row updateRow(Table table, Row oldrow, Row newrow)