Registry - Methods to get ALL component states

This commit is contained in:
Emmanuel BENOîT 2015-09-17 10:59:56 +02:00
parent 68a337ec6a
commit c4ff9e4339
2 changed files with 12 additions and 1 deletions

1
TODO
View file

@ -5,7 +5,6 @@ To Do:
* General usage documentation * General usage documentation
* Uncouple component-provided names from the library * Uncouple component-provided names from the library
* Automatically-updated singletons * Automatically-updated singletons
* Registry: get all component states
* Document exceptions * Document exceptions
Other ideas (maybe later if needed): Other ideas (maybe later if needed):

View file

@ -112,6 +112,18 @@ public class ComponentRegistry
} }
public List< ComponentState > getAllStates( )
{
return Collections.unmodifiableList( components );
}
public void getAllStates( Collection< ComponentState > result )
{
result.addAll( result );
}
public Object get( String name ) public Object get( String name )
{ {
ComponentState cs = this.byName.get( name ); ComponentState cs = this.byName.get( name );