diff --git a/TODO b/TODO index 405742c..2e1a1cf 100644 --- a/TODO +++ b/TODO @@ -5,7 +5,6 @@ To Do: * General usage documentation * Uncouple component-provided names from the library * Automatically-updated singletons - * Registry: get all component states * Document exceptions Other ideas (maybe later if needed): diff --git a/src/main/java/info/ebenoit/ebul/cmp/ComponentRegistry.java b/src/main/java/info/ebenoit/ebul/cmp/ComponentRegistry.java index 8a09414..ce252a0 100644 --- a/src/main/java/info/ebenoit/ebul/cmp/ComponentRegistry.java +++ b/src/main/java/info/ebenoit/ebul/cmp/ComponentRegistry.java @@ -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 ) { ComponentState cs = this.byName.get( name );