Class SimpleJavaRegistry<T>
java.lang.Object
org.geysermc.geyser.session.cache.registry.SimpleJavaRegistry<T>
- All Implemented Interfaces:
JavaRegistry<T>
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final it.unimi.dsi.fastutil.objects.ObjectArrayList<RegistryEntryData<T>> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbyId(@org.checkerframework.checker.index.qual.NonNegative int id) Looks up a registry entry by its ID.byKey(net.kyori.adventure.key.Key key) Looks up a registry entry by its key.intReverse looks-up an object to return its network ID, or -1.entryById(@org.checkerframework.checker.index.qual.NonNegative int id) Looks up a registry entry by its ID, and returns it wrapped inRegistryEntryDataso that its registered key is also known.@Nullable RegistryEntryData<T>entryByKey(net.kyori.adventure.key.Key key) Looks up a registry entry by its key, and returns it wrapped inRegistryEntryData.entryByValue(T value) Reverse looks-up an object to return it wrapped inRegistryEntryData, or null.List<net.kyori.adventure.key.Key>keys()All keys of this registry, as a list.voidreset(List<RegistryEntryData<T>> values) Resets the objects by these IDs.intsize()The amount of values registered in this registry.toString()values()All values of this registry, as a list.
-
Field Details
-
values
-
-
Constructor Details
-
SimpleJavaRegistry
public SimpleJavaRegistry()
-
-
Method Details
-
byId
Description copied from interface:JavaRegistryLooks up a registry entry by its ID. The object can be null, or not present.- Specified by:
byIdin interfaceJavaRegistry<T>
-
entryById
Description copied from interface:JavaRegistryLooks up a registry entry by its ID, and returns it wrapped inRegistryEntryDataso that its registered key is also known. The object can be null, or not present.- Specified by:
entryByIdin interfaceJavaRegistry<T>
-
byKey
Description copied from interface:JavaRegistryLooks up a registry entry by its key. The object can be null, or not present.- Specified by:
byKeyin interfaceJavaRegistry<T>
-
entryByKey
Description copied from interface:JavaRegistryLooks up a registry entry by its key, and returns it wrapped inRegistryEntryData. The object can be null, or not present.- Specified by:
entryByKeyin interfaceJavaRegistry<T>
-
byValue
Description copied from interface:JavaRegistryReverse looks-up an object to return its network ID, or -1.- Specified by:
byValuein interfaceJavaRegistry<T>
-
entryByValue
Description copied from interface:JavaRegistryReverse looks-up an object to return it wrapped inRegistryEntryData, or null.- Specified by:
entryByValuein interfaceJavaRegistry<T>
-
reset
Description copied from interface:JavaRegistryResets the objects by these IDs.- Specified by:
resetin interfaceJavaRegistry<T>
-
keys
Description copied from interface:JavaRegistryAll keys of this registry, as a list.- Specified by:
keysin interfaceJavaRegistry<T>
-
values
Description copied from interface:JavaRegistryAll values of this registry, as a list.- Specified by:
valuesin interfaceJavaRegistry<T>
-
size
public int size()Description copied from interface:JavaRegistryThe amount of values registered in this registry.- Specified by:
sizein interfaceJavaRegistry<T>
-
toString
-