Example usage for org.apache.commons.collections BidiMap removeValue

List of usage examples for org.apache.commons.collections BidiMap removeValue

Introduction

In this page you can find the example usage for org.apache.commons.collections BidiMap removeValue.

Prototype

Object removeValue(Object value);

Source Link

Document

Removes the key-value pair that is currently mapped to the specified value (optional operation).

Usage

From source file:BidiMapExample.java

public static void main(String args[]) {

    BidiMap agentToCode = new DualHashBidiMap();
    agentToCode.put("007", "Bond");
    agentToCode.put("006", "Joe");

    agentToCode = UnmodifiableBidiMap.decorate(agentToCode);
    agentToCode.put("002", "Fairbanks"); // throws Exception
    agentToCode.remove("007"); // throws Exception
    agentToCode.removeValue("Bond"); // throws Exception
}