public interface ComponentRegistry<T>
Map.| Modifier and Type | Method and Description |
|---|---|
void |
add(String keyword,
T object)
Adds a new mapping in theregistry, with the given keyword and object value.
|
void |
add(T object)
Adds a new mapping in the registry for the given object.
|
boolean |
exists(String keyword)
Tests to see if a mapping exists for the given keyword.
|
boolean |
exists(T object)
Tests to see if a given object is mapped in the registry.
|
T |
find(String keyword)
Returns the mapped object, given a keyword alias.
|
Iterable<T> |
getRegisteredComponents()
Returns only the registered objects, without their keyword aliases.
|
Map<String,T> |
getRegistry()
Returns the entire
Map of registered items. |
void |
setRegistry(Map<String,T> registry)
Sets the registry mappings, given a supplied
Map of keyword-object mappings. |
T find(String keyword)
keyword - String value of the alias.boolean exists(String keyword)
keyword - String keyword.boolean exists(T object)
object - mappable object.void add(T object)
object - The object to be registered.void add(String keyword, T object)
keyword - String alias for the object.object - The object to be registered.Map<String,T> getRegistry()
Map of registered items.Iterable<T> getRegisteredComponents()
Copyright © 2016. All rights reserved.