public class RegistryNamespacedDefaultedByKey<K,V> extends RegistryNamespaced<K,V>
inverseObjectRegistry, underlyingIntegerMapregistryObjects| Constructor and Description |
|---|
RegistryNamespacedDefaultedByKey(K defaultValueKeyIn) |
| Modifier and Type | Method and Description |
|---|---|
int |
getIDForObject(V value)
Gets the integer ID we use to identify the given object.
|
K |
getNameForObject(V value)
Gets the name we use to identify the given object.
|
V |
getObject(K name) |
V |
getObjectById(int id)
Gets the object identified by the given ID.
|
V |
getRandomObject(java.util.Random random) |
void |
register(int id,
K key,
V value) |
void |
validateKey()
validates that this registry's key is non-null
|
containsKey, createUnderlyingMap, iteratorgetKeys, putObjectpublic RegistryNamespacedDefaultedByKey(K defaultValueKeyIn)
public void register(int id,
K key,
V value)
register in class RegistryNamespaced<K,V>public void validateKey()
public int getIDForObject(V value)
getIDForObject in class RegistryNamespaced<K,V>public K getNameForObject(V value)
getNameForObject in class RegistryNamespaced<K,V>public V getObjectById(int id)
getObjectById in class RegistryNamespaced<K,V>public V getRandomObject(java.util.Random random)
getRandomObject in class RegistrySimple<K,V>