|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface DisposableMap<K,V>
A special kind of Map backed by an EventList that is expected to live longer
than this Map. It defines a dispose() method which should be called
when the Map is no longer useful, but the underlying EventList is
still referenced and useful. It allows this Map to be garbage collected
before its source EventList.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface java.util.Map |
|---|
Map.Entry<K,V> |
| Method Summary | |
|---|---|
void |
dispose()
Releases the resources consumed by this DisposableMap so that it
may eventually be garbage collected. |
| Methods inherited from interface java.util.Map |
|---|
clear, containsKey, containsValue, entrySet, equals, get, hashCode, isEmpty, keySet, put, putAll, remove, size, values |
| Method Detail |
|---|
void dispose()
DisposableMap so that it
may eventually be garbage collected.
A DisposableMap will be garbage collected without a call to
dispose(), but not before its source EventList is garbage
collected. By calling dispose(), you allow the DisposableMap
to be garbage collected before its source EventList. This is
necessary for situations where a DisposableMap is short-lived but
its source EventList is long-lived.
Warning: It is an error
to call any method on a DisposableMap after it has been disposed.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||