Package org.eclipse.net4j.util.registry
Class UnmodifiableRegistry<K,V>
- java.lang.Object
-
- org.eclipse.net4j.util.registry.UnmodifiableRegistry<K,V>
-
- All Implemented Interfaces:
java.util.Map<K,V>,IContainer<java.util.Map.Entry<K,V>>,INotifier,IRegistry<K,V>
public class UnmodifiableRegistry<K,V> extends java.lang.Object implements IRegistry<K,V>
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.eclipse.net4j.util.container.IContainer
IContainer.Modifiable<E>, IContainer.Persistable<E>, IContainer.Persistence<E>
-
Nested classes/interfaces inherited from interface org.eclipse.net4j.util.event.INotifier
INotifier.INotifier2
-
-
Constructor Summary
Constructors Constructor Description UnmodifiableRegistry(IRegistry<K,V> delegate)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddListener(IListener listener)Adds a listener to this notifier.voidclear()voidcommit()voidcommit(boolean notifications)booleancontainsKey(java.lang.Object key)booleancontainsValue(java.lang.Object value)java.util.Set<java.util.Map.Entry<K,V>>entrySet()booleanequals(java.lang.Object o)Vget(java.lang.Object key)java.util.Map.Entry<K,V>[]getElements()IListener[]getListeners()Returns the listeners that are registered with this notifier.inthashCode()booleanhasListeners()Returnstrueif one or more listeners are registered with this notifier,falseotherwise.booleanisAutoCommit()booleanisEmpty()java.util.Set<K>keySet()Vput(K key, V value)voidputAll(java.util.Map<? extends K,? extends V> t)Vremove(java.lang.Object key)voidremoveListener(IListener listener)Removes a listener from this notifier.voidsetAutoCommit(boolean on)intsize()java.util.Collection<V>values()
-
-
-
Method Detail
-
addListener
public void addListener(IListener listener)
Description copied from interface:INotifierAdds 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:
addListenerin interfaceINotifier
-
removeListener
public void removeListener(IListener listener)
Description copied from interface:INotifierRemoves a listener from this notifier.- Specified by:
removeListenerin interfaceINotifier
-
getListeners
public IListener[] getListeners()
Description copied from interface:INotifierReturns the listeners that are registered with this notifier.Depending on the implementation duplicate listeners may be contained in the returned array.
- Specified by:
getListenersin interfaceINotifier- Since:
- 3.0
-
hasListeners
public boolean hasListeners()
Description copied from interface:INotifierReturnstrueif one or more listeners are registered with this notifier,falseotherwise.- Specified by:
hasListenersin interfaceINotifier- Since:
- 3.0
-
setAutoCommit
public void setAutoCommit(boolean on)
- Specified by:
setAutoCommitin interfaceIRegistry<K,V>
-
isAutoCommit
public boolean isAutoCommit()
- Specified by:
isAutoCommitin interfaceIRegistry<K,V>
-
isEmpty
public boolean isEmpty()
- Specified by:
isEmptyin interfaceIContainer<K>- Specified by:
isEmptyin interfacejava.util.Map<K,V>
-
getElements
public java.util.Map.Entry<K,V>[] getElements()
- Specified by:
getElementsin interfaceIContainer<K>
-
containsKey
public boolean containsKey(java.lang.Object key)
-
containsValue
public boolean containsValue(java.lang.Object value)
-
values
public java.util.Collection<V> values()
-
equals
public boolean equals(java.lang.Object o)
-
-