Package 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>
-
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
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addListener
(IListener listener) Adds a listener to this notifier.void
clear()
void
commit()
void
commit
(boolean notifications) boolean
containsKey
(Object key) boolean
containsValue
(Object value) entrySet()
boolean
Returns the listeners that are registered with this notifier.int
hashCode()
boolean
Returnstrue
if one or more listeners are registered with this notifier,false
otherwise.boolean
boolean
isEmpty()
keySet()
void
void
removeListener
(IListener listener) Removes a listener from this notifier.void
setAutoCommit
(boolean on) int
size()
values()
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.util.Map
compute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, putIfAbsent, remove, replace, replace, replaceAll
-
Constructor Details
-
UnmodifiableRegistry
-
-
Method Details
-
addListener
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 interfaceINotifier
-
removeListener
Description copied from interface:INotifier
Removes a listener from this notifier.- Specified by:
removeListener
in interfaceINotifier
-
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 interfaceINotifier
- Since:
- 3.0
-
hasListeners
public boolean hasListeners()Description copied from interface:INotifier
Returnstrue
if one or more listeners are registered with this notifier,false
otherwise.- Specified by:
hasListeners
in interfaceINotifier
- Since:
- 3.0
-
put
-
putAll
-
remove
-
clear
public void clear() -
commit
public void commit() -
commit
public void commit(boolean notifications) -
setAutoCommit
public void setAutoCommit(boolean on) - Specified by:
setAutoCommit
in interfaceIRegistry<K,
V>
-
isAutoCommit
public boolean isAutoCommit()- Specified by:
isAutoCommit
in interfaceIRegistry<K,
V>
-
isEmpty
public boolean isEmpty() -
size
public int size() -
getElements
- Specified by:
getElements
in interfaceIContainer<K>
-
get
-
containsKey
- Specified by:
containsKey
in interfaceMap<K,
V>
-
containsValue
- Specified by:
containsValue
in interfaceMap<K,
V>
-
entrySet
-
keySet
-
values
-
equals
-
hashCode
public int hashCode()
-