Component state - Getters for dependencies and reverse dependencies

This commit is contained in:
Emmanuel BENOîT 2015-09-15 17:00:18 +02:00
parent cced54a9fc
commit 92ebf8dad2

View file

@ -1,7 +1,10 @@
package info.ebenoit.ebul.cmp;
import java.util.Collection;
import java.util.Collections;
import java.util.HashSet;
import java.util.Set;
import info.ebenoit.ebul.func.FunctionException;
import info.ebenoit.ebul.func.ThrowingConsumer;
@ -93,6 +96,30 @@ public final class ComponentState
}
public Set< ComponentState > getDependencies( )
{
return Collections.unmodifiableSet( dependencies );
}
public void getDependencies( Collection< ComponentState > output )
{
output.addAll( dependencies );
}
public Set< ComponentState > getReverseDependencies( )
{
return Collections.unmodifiableSet( reverseDependencies );
}
public void getReverseDependencies( Collection< ComponentState > output )
{
output.addAll( reverseDependencies );
}
public boolean isInitialised( )
{
return this.initialised;