Registry.Entry<K,V>, Registry.RegistryMapper<K,V>
Modifier and Type | Field and Description |
---|---|
protected java.util.Map<K,V> |
map
The map used by this register.
|
Constructor and Description |
---|
MapRegistry() |
MapRegistry(java.util.Map<K,V> map) |
Modifier and Type | Method and Description |
---|---|
java.util.Set<Registry.Entry<K,V>> |
entries() |
boolean |
hasRegistryFor(K key)
Checks if the key is registered.
|
Registry.RegistryMapper<K,V> |
register(V value)
Register the given object.
|
V |
registryFor(K key)
Returns the registry mapped to the given key.
|
V |
removeRegistryFor(K key)
Removes the registry for the given key.
|
public V registryFor(K key)
Registry
null
if
no registry is found.registryFor
in interface Registry<K,V>
public boolean hasRegistryFor(K key)
Registry
hasRegistryFor
in interface Registry<K,V>
key
- the key to verify.true
if any registry is mapped to the given key.public V removeRegistryFor(K key)
Registry
removeRegistryFor
in interface Registry<K,V>
public Registry.RegistryMapper<K,V> register(V value)
Registry