org.eclipse.net4j.util.registry
Class UnmodifiableRegistry<K,V>
java.lang.Object
org.eclipse.net4j.util.registry.UnmodifiableRegistry<K,V>
- All Implemented Interfaces:
- Map<K,V>, IContainer<Map.Entry<K,V>>, INotifier, IRegistry<K,V>
- public class UnmodifiableRegistry<K,V>
- extends Object
- implements IRegistry<K,V>
Nested classes/interfaces inherited from interface java.util.Map |
Map.Entry<K,V> |
UnmodifiableRegistry
public UnmodifiableRegistry(IRegistry<K,V> delegate)
addListener
public void addListener(IListener listener)
- Description copied from interface:
INotifier
- Adds a listener to this notifier.
Depending on the implementation duplicate listeners may lead to duplicate event delivery or not. Implementors are
encouraged to prevent events from being delivered more than once to the same listener,
- Specified by:
addListener
in interface INotifier
removeListener
public void removeListener(IListener listener)
- Description copied from interface:
INotifier
- Removes a listener from this notifier.
- Specified by:
removeListener
in interface INotifier
getListeners
public IListener[] getListeners()
- Description copied from interface:
INotifier
- Returns the listeners that are registered with this notifier.
Depending on the implementation duplicate listeners may be contained in the returned array.
- Specified by:
getListeners
in interface INotifier
- Since:
- 3.0
hasListeners
public boolean hasListeners()
- Description copied from interface:
INotifier
- Returns
true
if one or more listeners are registered with this notifier, false
otherwise.
- Specified by:
hasListeners
in interface INotifier
- Since:
- 3.0
put
public V put(K key,
V value)
- Specified by:
put
in interface Map<K,V>
putAll
public void putAll(Map<? extends K,? extends V> t)
- Specified by:
putAll
in interface Map<K,V>
remove
public V remove(Object key)
- Specified by:
remove
in interface Map<K,V>
clear
public void clear()
- Specified by:
clear
in interface Map<K,V>
commit
public void commit()
- Specified by:
commit
in interface IRegistry<K,V>
commit
public void commit(boolean notifications)
- Specified by:
commit
in interface IRegistry<K,V>
setAutoCommit
public void setAutoCommit(boolean on)
- Specified by:
setAutoCommit
in interface IRegistry<K,V>
isAutoCommit
public boolean isAutoCommit()
- Specified by:
isAutoCommit
in interface IRegistry<K,V>
isEmpty
public boolean isEmpty()
- Specified by:
isEmpty
in interface Map<K,V>
- Specified by:
isEmpty
in interface IContainer<Map.Entry<K,V>>
size
public int size()
- Specified by:
size
in interface Map<K,V>
getElements
public Map.Entry<K,V>[] getElements()
- Specified by:
getElements
in interface IContainer<Map.Entry<K,V>>
get
public V get(Object key)
- Specified by:
get
in interface Map<K,V>
containsKey
public boolean containsKey(Object key)
- Specified by:
containsKey
in interface Map<K,V>
containsValue
public boolean containsValue(Object value)
- Specified by:
containsValue
in interface Map<K,V>
entrySet
public Set<Map.Entry<K,V>> entrySet()
- Specified by:
entrySet
in interface Map<K,V>
keySet
public Set<K> keySet()
- Specified by:
keySet
in interface Map<K,V>
values
public Collection<V> values()
- Specified by:
values
in interface Map<K,V>
equals
public boolean equals(Object o)
- Specified by:
equals
in interface Map<K,V>
- Overrides:
equals
in class Object
hashCode
public int hashCode()
- Specified by:
hashCode
in interface Map<K,V>
- Overrides:
hashCode
in class Object
Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) and others.