org.axiondb.engine.rowcollection
Class IntRowMap

java.lang.Object
  extended by org.axiondb.engine.rowcollection.IntHashMap
      extended by org.axiondb.engine.rowcollection.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 $

Nested Class Summary
 
Nested classes/interfaces inherited from class org.axiondb.engine.rowcollection.IntHashMap
IntHashMap.Entry, IntHashMap.EntryIterator, IntHashMap.ValueIterator, IntHashMap.Values
 
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
 void addIndex(Index index)
           
 Row addRow(Table table, Row row)
           
 void clear()
          Removes all mappings from this IntRowMap.
 void clearIndexes()
           
 Row deleteRow(Table table, Row deleted)
           
 RowIterator getIndexedRows(Table source, Selectable node, boolean readOnly)
           
 Index getIndexForColumn(Column column)
           
 Row getRow(int key)
          Returns the value to which this IntRowMapmaps the specified key.
 boolean isColumnIndexed(Column column)
           
 void populateIndex(Table table, Index index)
           
 Row putRow(int key, Row value)
          Associates the specified value with the specified key in this IntRowMap.
 Row removeRow(int key)
          Removes the mapping for this key from this IntRowMapif present.
 RowIterator rowIterator()
          Returns a list iterator over the values in this list in proper sequence, (this map maintains the insertion order).
 RowCollection rowValues()
          Returns a RowCollectionview of the values contained in this IntRowMap.
 void shutdown()
           
 void truncateIndices()
           
 Row updateRow(Table table, Row oldrow, Row newrow)
           
 
Methods inherited from class org.axiondb.engine.rowcollection.IntHashMap
addEntry, containsKey, containsValue, entryIterator, equals, get, getEntry, hashCode, headEntry, isEmpty, keyIterator, keys, newEntry, put, putAll, remove, removeEntry, size, tailEntry, toString, valueIterator, values
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

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)
           throws AxionException
Throws:
AxionException

clear

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

Overrides:
clear in class IntHashMap

clearIndexes

public final void clearIndexes()

deleteRow

public Row deleteRow(Table table,
                     Row deleted)
              throws AxionException
Throws:
AxionException

getIndexedRows

public RowIterator getIndexedRows(Table source,
                                  Selectable node,
                                  boolean readOnly)
                           throws AxionException
Throws:
AxionException

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)
                   throws AxionException
Throws:
AxionException

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()
                     throws AxionException
Throws:
AxionException

updateRow

public Row updateRow(Table table,
                     Row oldrow,
                     Row newrow)
              throws AxionException
Throws:
AxionException