Package eu.sculkpowered.server.registry
Interface Registry<E extends Registry.Entry>
- All Known Subinterfaces:
Registry.Mutable<E>
public interface Registry<E extends Registry.Entry>
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic interface
static interface
Registry.Mutable<E extends Registry.Entry>
-
Method Summary
Modifier and TypeMethodDescriptionReturns the default value of the registry.@NotNull Collection
<E> entries()
Gets a collection of all entries.get
(int id) Gets an entry by its id.default E
Gets an entry by its key.Gets an entry by its key.default E
Gets an entry by its key.@NotNull String
type()
Gets the type key of the registry.
-
Method Details
-
type
Gets the type key of the registry.- Returns:
- the type key of the registry
- Since:
- 1.0.0
-
get
Gets an entry by its key.- Parameters:
key
- the key of the entrydef
- the default what will be returned if nothing is found- Returns:
- the entry or a default value
- Since:
- 1.0.0
-
get
Gets an entry by its key.- Parameters:
key
- the key of the entry- Returns:
- the entry or a default value
- Since:
- 1.0.0
-
get
Gets an entry by its key.- Parameters:
key
- the key of the entry- Returns:
- the entry or a default value
- Since:
- 1.0.0
-
get
Gets an entry by its id.- Parameters:
id
- the id of the entry- Returns:
- the entry or a default value
- Since:
- 1.0.0
-
entries
Gets a collection of all entries.- Returns:
- the collection of all entries
- Since:
- 1.0.0
-
defaultValue
Returns the default value of the registry.- Returns:
- the default value
-