Interface Registry<T extends Nameable, V>
- Type Parameters:
T- Type ofNameableV- Type of stored entries
- All Known Subinterfaces:
SchematicRegistry, StorageRegistry
-
Method Summary
Modifier and TypeMethodDescriptionReturns the value associated with this keybooleanisRegistered(T key) Checks if an entry with this key is registeredvoidRegisters an enty with this keyregistry()Get a map of the registered entriesvoidunregister(T key) Unregisters any value associated with this key.
-
Method Details
-
register
Registers an enty with this key- Parameters:
key- keyentry- entry- Throws:
AlreadyRegisteredException- When an entry with this key is already present.
-
unregister
-
get
Returns the value associated with this key- Parameters:
key- key- Returns:
- value
- Throws:
IllegalArgumentException- if no entry is registered with this key.
-
isRegistered
Checks if an entry with this key is registered- Parameters:
key- key- Returns:
- true if registered
-
registry
-