jdbm
Interface InverseHashView<K,V>

Type Parameters:
K -
V -

public interface InverseHashView<K,V>

Provides inverse view on persisted map. It uses hash index to find Key which belongs to Value. Value must correctly implement hashCode . Internally is backed by SecondaryTreeMap which uses value hashCode as Secondary key.

Author:
Jan Kotek

Method Summary
 K findKeyForValue(V val)
          Finds first primary key which corresponds to value.
 java.lang.Iterable<K> findKeysForValue(V val)
          Finds primary keys which corresponds to value.
 

Method Detail

findKeyForValue

K findKeyForValue(V val)
Finds first primary key which corresponds to value. There may be more then one, others are ignored

Parameters:
val -
Returns:
first primary key found or null if not found

findKeysForValue

java.lang.Iterable<K> findKeysForValue(V val)
Finds primary keys which corresponds to value. There may be more then one, others are ignored

Parameters:
val -
Returns:
primary keys found


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