Class RecordedOutputs
Object
org.anchoranalysis.io.output.recorded.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 Summary
Constructors Constructor Description RecordedOutputs() -
Method Summary
Modifier and Type Method Description voidadd(String outputName, boolean allowed)Adds a new output-name to the set of recorded names.booleanhasAtLeastOneDisabled()If there is at least one disabled output.booleanhasAtLeastOneEnabled()If there is at least one enabled output.booleanhasAtLeastOneMultiplex(boolean enabled)Multiplex betweenhasAtLeastOneEnabled()andhasAtLeastOneDisabled().booleanisEmpty()If no output-names exist.booleanisRecordedAsEnabled(String outputName)Is a particular output-name recorded as enabled?intnumberDisabled()Number of output-names that were not enabled.intnumberEnabled()Number of output-names that were enabled.StringsummarizeDisabled()A comma-separated string of all output-names that were not enabled.StringsummarizeEnabled()A comma-separated string of all output-names that were enabled.StringsummarizeMultiplex(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
-