mirror of
https://github.com/darksaid98/Carbon.git
synced 2026-12-01 22:15:08 +00:00
Add channel registry and remove custom channels
This commit is contained in:
1 parent
bbeaa3bb85
commit
dceb47e160
19 files changed
+200
-565
No files matched your search
@@ -0,0 +1,33 @@
|
||||
package net.draycia.simplechat.util;
|
||||
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import java.util.Collection;
|
||||
|
||||
public interface Registry<T> {
|
||||
|
||||
/**
|
||||
* Adds the specified key and value to the registry
|
||||
* @param key The entry's key
|
||||
* @param value The value to insert
|
||||
* @return If successfully registered
|
||||
*/
|
||||
boolean register(@NotNull String key, @NotNull T value);
|
||||
|
||||
/**
|
||||
* Gets the list of registered values
|
||||
* @return The list of registered values
|
||||
*/
|
||||
@NotNull
|
||||
Collection<T> values();
|
||||
|
||||
/**
|
||||
* Obtains an entry associated with the specified key
|
||||
* @param key The key for the entry
|
||||
* @return The entry associated with the key
|
||||
*/
|
||||
@Nullable
|
||||
T get(String key);
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user