public class RecordedOutputs extends Object
RecordOutputNamesForWriter
.
Three separate sets are recorded:
Adding outputs to this class is a thread-safe operation.
Constructor and Description |
---|
RecordedOutputs() |
Modifier and Type | Method and Description |
---|---|
void |
add(String outputName,
boolean allowed)
Adds a new output-name to the set of recorded names.
|
boolean |
hasAtLeastOneDisabled()
If there is at least one disabled output.
|
boolean |
hasAtLeastOneEnabled()
If there is at least one enabled output.
|
boolean |
hasAtLeastOneMultiplex(boolean enabled)
Multiplex between
hasAtLeastOneEnabled() and hasAtLeastOneDisabled() . |
boolean |
isEmpty()
If no output-names exist.
|
boolean |
isRecordedAsEnabled(String outputName)
Is a particular output-name recorded as enabled?
|
int |
numberDisabled()
Number of output-names that were not enabled.
|
int |
numberEnabled()
Number of output-names that were enabled.
|
String |
summarizeDisabled()
A comma-separated string of all output-names that were not enabled.
|
String |
summarizeEnabled()
A comma-separated string of all output-names that were enabled.
|
String |
summarizeMultiplex(boolean enabled)
Multiplex between
summarizeEnabled() and summarizeDisabled() . |
public void add(String outputName, boolean allowed)
outputName
- the output-nameallowed
- where the output was allowed or notpublic int numberEnabled()
public int numberDisabled()
public boolean hasAtLeastOneEnabled()
public boolean hasAtLeastOneDisabled()
public boolean hasAtLeastOneMultiplex(boolean enabled)
hasAtLeastOneEnabled()
and hasAtLeastOneDisabled()
.enabled
- if true, consider the number of output names that were enabled, otherwise
those that were disabled.public boolean isEmpty()
public String summarizeEnabled()
The strings are separated by a comma and a space, and are alphabetically-ordered.
public String summarizeDisabled()
The strings are separated by a comma and a space, and are alphabetically-ordered.
public String summarizeMultiplex(boolean enabled)
summarizeEnabled()
and summarizeDisabled()
.enabled
- if true, perform a summary of output names that were enabled, otherwise those
that were disabled.public boolean isRecordedAsEnabled(String outputName)
outputName
- the output-nameCopyright © 2010–2023 Owen Feehan, ETH Zurich, University of Zurich, Hoffmann-La Roche. All rights reserved.