public class MandatoryAndOptionalComponentsMonitor extends Object implements ComponentsMonitor
| Modifier and Type | Field and Description |
|---|---|
private ComponentsMonitor |
mandatoryComponentsMonitor
The mandatory components monitor.
|
private ComponentsMonitor |
optionalComponentsMonitor
The optional components monitor.
|
| 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.
|
private ComponentsMonitor mandatoryComponentsMonitor
private ComponentsMonitor optionalComponentsMonitor
public MandatoryAndOptionalComponentsMonitor(String[] mandatoryComponents, String[] optionalComponents)
mandatoryComponents - the mandatory componentsoptionalComponents - the optional componentsIllegalArgumentException - if the same component is defined as mandatory and optionalpublic ComponentsMonitor useComponent(String component)
useComponent in interface ComponentsMonitorcomponent - the componentpublic boolean allComponentsUsed()
allComponentsUsed in interface ComponentsMonitorpublic boolean finalStateValid()
finalStateValid in interface ComponentsMonitorpublic List<String> getRemainingComponents()
getRemainingComponents in interface ComponentsMonitorCopyright © 2003–2019 The Apache Software Foundation. All rights reserved.