public class RegistryNamespacedDefaultedByKey<K,V> extends RegistryNamespaced<K,V>
inverseObjectRegistry, underlyingIntegerMap
registryObjects
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.
|
int |
getIDForObjectBypass(V bypass) |
K |
getNameForObject(V value)
Gets the name we use to identify the given object.
|
K |
getNameForObjectBypass(V value) |
V |
getObject(K name) |
V |
getObjectById(int id)
Gets the object identified by the given ID.
|
V |
getObjectByIdBypass(int id) |
V |
getObjectBypass(K name) |
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, iterator
getKeys, putObject
public 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>
public int getIDForObjectBypass(V bypass)
public V getObjectByIdBypass(int id)