|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.deckfour.xes.util.XRegistry<T>
public abstract class XRegistry<T>
Template implementation for a generic registry.
| Constructor Summary | |
|---|---|
XRegistry()
Instantiates a new registry. |
|
| Method Summary | |
|---|---|
protected abstract boolean |
areEqual(T a,
T b)
Subclasses must implement this method. |
T |
currentDefault()
Retrieves the current default instance. |
Set<T> |
getAvailable()
Retrieves a set of all available instances. |
protected boolean |
isContained(T instance)
Checks whether the given instance is already contained in the registry. |
void |
register(T instance)
Registers a new instance with this registry. |
void |
setCurrentDefault(T instance)
Sets the current default instance of this registry. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public XRegistry()
| Method Detail |
|---|
public Set<T> getAvailable()
public T currentDefault()
public void register(T instance)
instance - Instance to be registered.public void setCurrentDefault(T instance)
instance - Instance to be the
current default of this registry.
protected abstract boolean areEqual(T a,
T b)
a - An instance a.b - Another instance b.
protected boolean isContained(T instance)
instance - Instance to check against registry.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||