Class CrudMap<Key,Value>

java.lang.Object
java.util.AbstractMap<Key,Value>
de.xima.fc.common.collection.CrudMap<Key,Value>
Type Parameters:
Key - Type of the map keys.
Value - Type of the map values.
All Implemented Interfaces:
Serializable, Map<Key,Value>

public final class CrudMap<Key,Value> extends AbstractMap<Key,Value> implements Serializable
CRUD = create, read, update, and delete

A map that delegates to a CrudMapAdapter with a get(key), set(key, value), and delete method. This lets you implement a map in terms of simple get, set, delete operations (instead of having to implement an entry set when using AbstractMap).

This is especially useful when you do not have a simple map, but need to compute the keys or values in some fashion.

You can also use this to implement a view of an existing map with mapped or filtered keys and values: Keys for which get returns null are excluded from the map.

The map is serializable if the data adapter is serializable.

Since:
8.2.0
Author:
XIMA MEDIA GmbH
See Also: