I'm wondering if there are any Java data structures or libraries that would allow me to have multiple keys while not having duplicate keys?

In my use case I have two different types of keys: Personal Identification Number and Driver License. I want to use either keys to look up a value (their car in this example). When I try to add a duplicate key (pin-1), there should be an error as pin-1 is already assigned.

```
structure.add("pin-1", "driverLicense-1", Car.TOYOTA);
structure.add("pin-2", "driverLicense-2", Car.FORD);
structure.add("pin-1", "driverLicense-3", CAR.FORD); // invalid because pin-1 is already assigned

```

The only library I have encountered that does something like this is Google’s [Guava](https://guava.dev/) and its [`HashBasedTable`](https://guava.dev/releases/snapshot/api/docs/com/google/common/collect/HashBasedTable.html) class implementing [`Table`](https://github.com/google/guava/wiki/NewCollectionTypesExplained#table). The issue I have with this library is that it does not prevent duplicate keys.

```
Table<String, String, Car> table = HashBasedTable.create();
table.put("pin-1", "driverLicense-1", Car.TOYOTA);
table.put("pin-2", "driverLicense-2", Car.FORD);
table.put("pin-1", "driverLicense-3", Car.FORD); // is valid

```