K
- The key type.V
- The value type.public interface Registry<K,V>
Modifier and Type | Interface and Description |
---|---|
static interface |
Registry.Entry<K,V>
Interface that represents a registry entry.
|
static interface |
Registry.RegistryMapper<K,V>
Interface for mapping a registry to a key.
|
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.
|
Registry.RegistryMapper<K,V> register(V value)
value
- the object to register.boolean hasRegistryFor(K key)
key
- the key to verify.true
if any registry is mapped to the given key.V registryFor(K key)
null
if
no registry is found.V removeRegistryFor(K key)
java.util.Set<Registry.Entry<K,V>> entries()