Registry#add -> #register

This commit is contained in:
dfsek
2021-07-05 19:20:47 -07:00
parent a89b250765
commit 888e9e8def
8 changed files with 15 additions and 16 deletions

View File

@@ -7,7 +7,7 @@ public interface CheckedRegistry<T> extends Registry<T> {
* Add a value to this registry, checking whether it is present first.
*
* @param identifier Identifier to assign value.
* @param value Value to add.
* @param value Value to register.
* @throws DuplicateEntryException If an entry with the same identifier is already present.
*/
void add(String identifier, T value) throws DuplicateEntryException;
@@ -18,7 +18,7 @@ public interface CheckedRegistry<T> extends Registry<T> {
* Use of this method is generally discouraged, as it is bad practice to overwrite registry values.
*
* @param identifier Identifier to assign value.
* @param value Value to add.
* @param value Value to register.
* @deprecated Use of {@link #add(String, Object)} is encouraged.
*/
@Deprecated

View File

@@ -7,15 +7,15 @@ public interface OpenRegistry<T> extends Registry<T> {
* Add a value to this registry.
*
* @param identifier Identifier to assign value.
* @param value Value to add.
* @param value Value to register.
*/
boolean add(String identifier, T value);
boolean register(String identifier, T value);
/**
* Add a value to this registry, checking whether it is present first.
*
* @param identifier Identifier to assign value.
* @param value Value to add.
* @param value Value to register.
* @throws DuplicateEntryException If an entry with the same identifier is already present.
*/
void addChecked(String identifier, T value) throws DuplicateEntryException;