public class RegistrySimple<K,V> extends java.lang.Object implements IRegistry<K,V>
Modifier and Type | Field and Description |
---|---|
protected java.util.Map<K,V> |
registryObjects
Objects registered on this registry.
|
Constructor and Description |
---|
RegistrySimple() |
Modifier and Type | Method and Description |
---|---|
boolean |
containsKey(K key)
Does this registry contain an entry for the given key?
|
protected java.util.Map<K,V> |
createUnderlyingMap()
Creates the Map we will use to map keys to their registered values.
|
java.util.Set<K> |
getKeys()
Gets all the keys recognized by this registry.
|
V |
getObject(K name) |
V |
getRandomObject(java.util.Random random) |
java.util.Iterator<V> |
iterator() |
void |
putObject(K key,
V value)
Register an object on this registry.
|
protected java.util.Map<K,V> createUnderlyingMap()
public java.util.Set<K> getKeys()
public V getRandomObject(java.util.Random random)
public boolean containsKey(K key)