public class EggGroupRegistry
extends java.lang.Object
EggGroup
Constructor and Description |
---|
EggGroupRegistry() |
Modifier and Type | Method and Description |
---|---|
static java.util.List<EggGroup> |
getAll()
Gets all registered egg groups
|
static int |
getCount()
Gets the number of registered
EggGroup |
static <T extends EggGroup> |
getEggGroup(java.lang.String key)
Attempts to get the egg group with the given key
Will return
Optional.empty() if not present |
static <T extends EggGroup> |
register(T t)
Registers a new
EggGroup instance |
static <T extends EggGroup> |
unregister(T t)
Unregisters a type of
EggGroup |
public static <T extends EggGroup> T register(T t)
EggGroup
instanceT
- The typet
- The type of egg grouppublic static <T extends EggGroup> java.util.Optional<T> getEggGroup(java.lang.String key)
Optional.empty()
if not presentT
- The typekey
- The keypublic static <T extends EggGroup> T unregister(T t)
EggGroup
T
- The typet
- The type to unregisterpublic static java.util.List<EggGroup> getAll()
public static int getCount()
EggGroup