public class DefaultRepository extends java.lang.Object implements Repository
| Modifier and Type | Field and Description |
|---|---|
private java.util.SortedMap<java.lang.String,java.lang.Object> |
instances
The unmarshaled object instances by name.
|
| Constructor and Description |
|---|
DefaultRepository() |
| Modifier and Type | Method and Description |
|---|---|
void |
add(java.lang.String name,
java.lang.Object instance)
Add an object instance to this repository.
|
boolean |
contains(java.lang.String name)
Does this repository contain a object with the specified name.
|
java.lang.Object |
get(java.lang.String name)
Gets the object or recipe with the specified name from this repository.
|
private final java.util.SortedMap<java.lang.String,java.lang.Object> instances
public boolean contains(java.lang.String name)
contains in interface Repositoryname - the unique name of the object instancepublic java.lang.Object get(java.lang.String name)
get in interface Repositoryname - the unique name of the object instancepublic void add(java.lang.String name,
java.lang.Object instance)
add in interface Repositoryname - the unique name of the instanceinstance - the instanceConstructionException - if another object instance is already registered with the name