public class RegistryNamespacedDefaultedByKey<K,V> extends RegistryNamespaced<K,V>
Modifier and Type | Field and Description |
---|---|
private V |
defaultValue |
private K |
defaultValueKey |
inverseObjectRegistry, underlyingIntegerMap
registryObjects
Constructor and Description |
---|
RegistryNamespacedDefaultedByKey(K defaultValueKeyIn) |
Modifier and Type | Method and Description |
---|---|
int |
getIDForObject(V value) |
K |
getNameForObject(V value) |
V |
getObject(K name) |
V |
getObjectById(int id) |
V |
getRandomObject(java.util.Random random) |
void |
register(int id,
K key,
V value) |
void |
validateKey() |
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>
@Nonnull public K getNameForObject(V value)
getNameForObject
in class RegistryNamespaced<K,V>
@Nonnull public V getObjectById(int id)
getObjectById
in class RegistryNamespaced<K,V>
@Nonnull public V getRandomObject(java.util.Random random)
getRandomObject
in class RegistrySimple<K,V>