Class MandatoryAndOptionalComponentsMonitor

    • Constructor Detail

      • MandatoryAndOptionalComponentsMonitor

        public MandatoryAndOptionalComponentsMonitor​(String[] mandatoryComponents,
                                                     String[] optionalComponents)
        Instantiates a new mandatory and optional components monitor. The mandatory and optional components must be disjunct.
        Parameters:
        mandatoryComponents - the mandatory components
        optionalComponents - the optional components
        Throws:
        IllegalArgumentException - if the same component is defined as mandatory and optional
    • Method Detail

      • allComponentsUsed

        public boolean allComponentsUsed()
        Check if all components are used.
        Specified by:
        allComponentsUsed in interface ComponentsMonitor
        Returns:
        true if all components are used
      • finalStateValid

        public boolean finalStateValid()
        Checks if the final state is valid. That depends whether the components are mandatory or optional.
        Specified by:
        finalStateValid in interface ComponentsMonitor
        Returns:
        true if the final state is valid