Class RecordedOutputs
Object
RecordedOutputs
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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
Adds a new output-name to the set of recorded names.boolean
If there is at least one disabled output.boolean
If there is at least one enabled output.boolean
hasAtLeastOneMultiplex
(boolean enabled) Multiplex betweenhasAtLeastOneEnabled()
andhasAtLeastOneDisabled()
.boolean
isEmpty()
If no output-names exist.boolean
isRecordedAsEnabled
(String outputName) Is a particular output-name recorded as enabled?int
Number of output-names that were not enabled.int
Number of output-names that were enabled.A comma-separated string of all output-names that were not enabled.A comma-separated string of all output-names that were enabled.summarizeMultiplex
(boolean enabled) Multiplex betweensummarizeEnabled()
andsummarizeDisabled()
.
-
Constructor Details
-
RecordedOutputs
public RecordedOutputs()
-
-
Method Details
-
add
Adds a new output-name to the set of recorded names.- Parameters:
outputName
- the output-nameallowed
- 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) Multiplex betweenhasAtLeastOneEnabled()
andhasAtLeastOneDisabled()
.- 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
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
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
Multiplex betweensummarizeEnabled()
andsummarizeDisabled()
.- 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
Is a particular output-name recorded as enabled?- Parameters:
outputName
- the output-name- Returns:
- true if the output-name has been recorded as enabled
-