public class MandatoryAndOptionalComponentsMonitor extends Object implements ComponentsMonitor
Constructor and Description |
---|
MandatoryAndOptionalComponentsMonitor(String[] mandatoryComponents,
String[] optionalComponents)
Instantiates a new mandatory and optional components monitor.
|
Modifier and Type | Method and Description |
---|---|
boolean |
allComponentsUsed()
Check if all components are used.
|
boolean |
finalStateValid()
Checks if the final state is valid.
|
List<String> |
getRemainingComponents()
Gets the remaining components.
|
ComponentsMonitor |
useComponent(String component)
Use a component.
|
public MandatoryAndOptionalComponentsMonitor(String[] mandatoryComponents, String[] optionalComponents) throws IllegalArgumentException
mandatoryComponents
- the mandatory componentsoptionalComponents
- the optional componentsIllegalArgumentException
- if the same component is defined as mandatory and optionalpublic ComponentsMonitor useComponent(String component)
useComponent
in interface ComponentsMonitor
component
- the componentpublic boolean allComponentsUsed()
allComponentsUsed
in interface ComponentsMonitor
public boolean finalStateValid()
finalStateValid
in interface ComponentsMonitor
public List<String> getRemainingComponents()
getRemainingComponents
in interface ComponentsMonitor
Copyright © 2003-2014 The Apache Software Foundation. All Rights Reserved.