Class RecordedOutputs

Object
RecordedOutputs

public class RecordedOutputs extends Object
Outputs recorded from RecordOutputNamesForWriter.

Three separate sets are recorded:

  • outputs that are written as they were enabled.
  • outputs that not written as they are not enabled.

Adding outputs to this class is a thread-safe operation.

Author:
Owen Feehan
  • Constructor Details

    • RecordedOutputs

      public RecordedOutputs()
  • Method Details

    • add

      public void add(String outputName, boolean allowed)
      Adds a new output-name to the set of recorded names.
      Parameters:
      outputName - the output-name
      allowed - where the output was allowed or not
    • numberEnabled

      public int numberEnabled()
      Number of output-names that were enabled.
      Returns:
      the number of names
    • numberDisabled

      public int numberDisabled()
      Number of output-names that were not enabled.
      Returns:
      the number of names
    • hasAtLeastOneEnabled

      public boolean hasAtLeastOneEnabled()
      If there is at least one enabled output.
      Returns:
      true if there is at least one output-name exists that was enabled.
    • hasAtLeastOneDisabled

      public boolean hasAtLeastOneDisabled()
      If there is at least one disabled output.
      Returns:
      true if there is at least one output-name exists that was disabled.
    • hasAtLeastOneMultiplex

      public boolean hasAtLeastOneMultiplex(boolean enabled)
      Parameters:
      enabled - if true, consider the number of output names that were enabled, otherwise those that were disabled.
      Returns:
      true if there is at least one output-name exists that was enabled/disabled.
    • isEmpty

      public boolean isEmpty()
      If no output-names exist.
      Returns:
      true iff no output-names have been recorded.
    • summarizeEnabled

      public String summarizeEnabled()
      A comma-separated string of all output-names that were enabled.

      The strings are separated by a comma and a space, and are alphabetically-ordered.

      Returns:
      the output-names as a string
    • summarizeDisabled

      public String summarizeDisabled()
      A comma-separated string of all output-names that were not enabled.

      The strings are separated by a comma and a space, and are alphabetically-ordered.

      Returns:
      the output-names as a string
    • summarizeMultiplex

      public String summarizeMultiplex(boolean enabled)
      Parameters:
      enabled - if true, perform a summary of output names that were enabled, otherwise those that were disabled.
      Returns:
      a summarize of the output-names as a string, separated by a comma and a space, and are alphabetically-ordered.
    • isRecordedAsEnabled

      public boolean isRecordedAsEnabled(String outputName)
      Is a particular output-name recorded as enabled?
      Parameters:
      outputName - the output-name
      Returns:
      true if the output-name has been recorded as enabled