Class OutputEnableRulesSpecify

Direct Known Subclasses:
AddToDefaults, IgnoreUnderscorePrefixUnless, NoneExcept, PermissiveExcept

public abstract class OutputEnableRulesSpecify extends OutputEnabledRules
Base class for an OutputEnabledRules that specifies particular output-names for first and second levels.
Author:
Owen Feehan
  • Constructor Details

    • OutputEnableRulesSpecify

      protected OutputEnableRulesSpecify(StringSet first)
      Create with a specific set of first-level output names.
      Parameters:
      first - first-level output-names
    • OutputEnableRulesSpecify

      protected OutputEnableRulesSpecify()
  • Method Details

    • firstLevelContains

      protected boolean firstLevelContains(String outputName)
      Whether the first-level names contain a particular output (if defined)?
      Parameters:
      outputName - the output-name to query.
      Returns:
      true iff the first-level names are defined and outputName is contained.
    • createSecondLevelFromSet

      protected abstract SingleLevelOutputEnabled createSecondLevelFromSet(StringSet outputNames)
      Creates a new second-level SingleLevelOutputEnabled from the relevant set of strings.
      Parameters:
      outputNames - a set of output-names that are used to create the SingleLevelOutputEnabled.
      Returns:
      the newly created SingleLevelOutputEnabled.
    • secondLevelOutputs

      protected SingleLevelOutputEnabled secondLevelOutputs(String outputName, OutputEnabled defaultValue)
      Retrieves a second-level SingleLevelOutputEnabled corresponding to a first-level output-name.
      Parameters:
      outputName - the name of the first-level output.
      defaultValue - the default-value used if no existing second-level entry exists.
      Returns:
      an existing corresponding SingleLevelOutputEnabled or otherwise a newly created one.
    • isFirstDefined

      protected boolean isFirstDefined()
      Are output-names in the first-level defined?
      Returns:
      true iff they are defined.
    • getFirst

      public StringSet getFirst()
      Output-names in the first-level.
    • setFirst

      public void setFirst(StringSet first)
      Output-names in the first-level.
    • getSecond

      public List<NamedBean<StringSet>> getSecond()
      Output-names in the second-level (for all first level output-names).

      If the list is empty, all second-level outputs are considered permissive.

    • setSecond

      public void setSecond(List<NamedBean<StringSet>> second)
      Output-names in the second-level (for all first level output-names).

      If the list is empty, all second-level outputs are considered permissive.