net.sf.javagimmicks.collections.bidimap.BidiMap Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of gimmicks Show documentation
Show all versions of gimmicks Show documentation
Utility classes, APIs and tools for Java
package net.sf.javagimmicks.collections.bidimap;
import java.util.Map;
/**
* Defines a {@link Map} that is bi-directional which means that values are
* unique and reverse lookup (value to key) is possible.
*/
public interface BidiMap extends Map
{
/**
* Returns an inverted view of this {@link BidiMap} (keys and values are
* exchanged).
*
* @return an inverted view of this {@link BidiMap}
*/
public BidiMap inverseBidiMap();
/**
* Retrieves the key that belongs to the given value.
*
* @param value
* the value whose key should be looked up
* @return the key for the given value or {@code null} if there is no such
* value
*/
public K getKey(V value);
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy