jdbm
Interface SecondaryHashMap<A,K,V>

Type Parameters:
A - Type of secondary key
K - Type of primary key
V - Type of value in primary map
All Superinterfaces:
java.util.Map<A,java.lang.Iterable<K>>
All Known Implementing Classes:
HTreeSecondaryMap

public interface SecondaryHashMap<A,K,V>
extends java.util.Map<A,java.lang.Iterable<K>>

Secondary HashMap. It provides view over primary data. This map is updated automatically as primary map changes. This map is unmodifiable, any attempt to modify it will throw 'UnsupportedOperationException'

Author:
Jan Kotek

Nested Class Summary
 
Nested classes/interfaces inherited from interface java.util.Map
java.util.Map.Entry<K,V>
 
Method Summary
 V getPrimaryValue(K k)
          Convert primary key to primary value.
 java.lang.Iterable<V> getPrimaryValues(A a)
          Returns values from primary map which are matching given secondary key
 
Methods inherited from interface java.util.Map
clear, containsKey, containsValue, entrySet, equals, get, hashCode, isEmpty, keySet, put, putAll, remove, size, values
 

Method Detail

getPrimaryValue

V getPrimaryValue(K k)
Convert primary key to primary value. This will query primary table and returns result, it is little shortcut.

Parameters:
k - primary key
Returns:
value from primary table

getPrimaryValues

java.lang.Iterable<V> getPrimaryValues(A a)
Returns values from primary map which are matching given secondary key

Parameters:
a -
Returns:
Iterable over values, this never returns null.


Cees de Groot (C) 2000. All rights reserved http://jdbm.sourceforge.net