public class AbstractRegistry<T,U> extends java.lang.Object implements IRegistry<T,U>
| Modifier and Type | Field and Description |
|---|---|
protected boolean |
canUnregister |
protected com.google.common.collect.BiMap<T,U> |
map |
protected ResourceName |
name |
protected com.google.common.collect.BiMap<T,U> |
unmodifiableMap |
| Constructor and Description |
|---|
AbstractRegistry(ResourceName name,
boolean canUnregister) |
| Modifier and Type | Method and Description |
|---|---|
java.util.Set<java.util.Map.Entry<T,U>> |
entrySet() |
U |
get(T key) |
T |
getId(U value) |
ResourceName |
getName() |
int |
getSize() |
com.google.common.collect.BiMap<T,U> |
getUnmodifiable() |
java.util.Set<T> |
keySet() |
void |
register(T key,
U value) |
java.lang.String |
toString() |
void |
unregister(T key) |
java.util.Set<U> |
values() |
protected final ResourceName name
protected final boolean canUnregister
public AbstractRegistry(ResourceName name, boolean canUnregister)
public void unregister(T key)
unregister in interface IRegistry<T,U>public com.google.common.collect.BiMap<T,U> getUnmodifiable()
getUnmodifiable in interface IRegistry<T,U>public ResourceName getName()
public java.lang.String toString()
toString in class java.lang.Object