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) |
int |
getIDForObjectBypass(V bypass) |
K |
getNameForObject(V value) |
K |
getNameForObjectBypass(V value) |
V |
getObject(K name) |
V |
getObjectById(int 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() |
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>
public int getIDForObjectBypass(@Nullable V bypass)
@Nullable public V getObjectByIdBypass(int id)