# Class: com.pnfsoftware.jeb.util.collect.BiMap

A bidirectional map of key\-values. This class is [serialializable](Ser). The null key and null value are forbidden. The key\-value mapping is one\-to\-one: a key can only map to one value, and one value can only map to one key. \(One consequence is that [putting](#put(Object, Object)) a key\-value pair may either increment, keep the same, or even decrement the map size. 

 Thread\-safety: none. 

 Note: this class does not implement the [Map](Map) interface, but attempts to follow its guidelines and contracts the best it can. One notable exception is that this class does not override hashCode/equals.

## Constructor: BiMap

Description: Create a new bi\-map.

## Constructor: BiMap
- parameter: `o`, type: `com.pnfsoftware.jeb.util.collect.BiMap<K,V>`

Description: Create a copy of an existing bi\-map.
parameter: o: 

## Constructor: BiMap
- parameter: `keyOrder`, type: `com.pnfsoftware.jeb.util.collect.CollectionOrder`

Description: Create a new bi\-map.
parameter: keyOrder: 

## Method: asMap
- return type: `java.util.Map<K,V>`


## Method: asReverseMap
- return type: `java.util.Map<V,K>`


## Method: clear


## Method: containsKey
- parameter: `key`, type: `K`
- return type: `boolean`


## Method: containsValue
- parameter: `value`, type: `V`
- return type: `boolean`


## Method: get
- parameter: `key`, type: `K`
- return type: `V`


## Method: getKeyForValue
- parameter: `value`, type: `V`
- return type: `K`


## Method: isEmpty
- return type: `boolean`


## Method: keySet
- return type: `java.util.Set<K>`


## Method: put
- parameter: `key`, type: `K`
- parameter: `value`, type: `V`
- return type: `V`


## Method: putAll
- parameter: `m`, type: `java.util.Map<? extends K,? extends V>`


## Method: remove
- parameter: `key`, type: `K`
- return type: `V`


## Method: removeValue
- parameter: `value`, type: `V`
- return type: `K`


## Method: size
- return type: `int`


## Method: toString
- return type: `java.lang.String`


## Method: values
- return type: `java.util.Set<V>`


