rwth.i2.ltlrv.data
Interface WeakValuesMap<K,V>

Type Parameters:
K - type parameter for key type
V - type parameter for value type
All Superinterfaces:
Map<K,V>
All Known Implementing Classes:
WeakValuesHashMap

public interface WeakValuesMap<K,V>
extends Map<K,V>

A map supporting weak values. Entries should disappear, when the value object is garbage collected.

Author:
Eric Bodden

Nested Class Summary
static class WeakValuesMap.Util
          Provides access to an empty map.
 
Nested classes/interfaces inherited from interface java.util.Map
Map.Entry<K,V>
 
Method Summary
 boolean isLocked()
          Returns if this map is locked.
 void lock()
          Locks the map, so that no modifications are allowed any more.
 
Methods inherited from interface java.util.Map
clear, containsKey, containsValue, entrySet, equals, get, hashCode, isEmpty, keySet, put, putAll, remove, size, values
 

Method Detail

lock

void lock()
Locks the map, so that no modifications are allowed any more. When a modifying method is called, a RuntimeException will be thrown.


isLocked

boolean isLocked()
Returns if this map is locked. When it is locked and a modifying method is called, a RuntimeException will be thrown.

Returns:
true if the map is locked