Class MultiLevelBinary
Object
org.anchoranalysis.io.output.enabled.multi.MultiLevelBinary
- All Implemented Interfaces:
MultiLevelOutputEnabled,SingleLevelOutputEnabled
- Direct Known Subclasses:
MultiLevelAnd,MultiLevelOr
public abstract class MultiLevelBinary extends Object implements MultiLevelOutputEnabled
Base class for operations that combines two
MultiLevelOutputEnableds.- Author:
- Owen Feehan
-
Constructor Summary
Constructors Modifier Constructor Description protectedMultiLevelBinary(MultiLevelOutputEnabled enabled1, MultiLevelOutputEnabled enabled2) -
Method Summary
Modifier and Type Method Description protected abstract booleancombine(boolean first, boolean second)Determines whether an output is enabled via a combination of the twoMultiLevelOutputEnabled.protected abstract SingleLevelOutputEnabledcombineSecond(SingleLevelOutputEnabled first, SingleLevelOutputEnabled second)Builds a second-level output by combiningenabled1andenabled2.booleanisOutputEnabled(String outputName)Is a particular a particular output-enabled?SingleLevelOutputEnabledsecond(String outputName)A second-level ofOutputEnabledfor a particularoutputNameas used in first-level.
-
Constructor Details
-
Method Details
-
isOutputEnabled
Description copied from interface:SingleLevelOutputEnabledIs a particular a particular output-enabled?- Specified by:
isOutputEnabledin interfaceSingleLevelOutputEnabled- Parameters:
outputName- the name of the output- Returns:
- true iff the output is allowed
-
second
Description copied from interface:MultiLevelOutputEnabledA second-level ofOutputEnabledfor a particularoutputNameas used in first-level.- Specified by:
secondin interfaceMultiLevelOutputEnabled- Parameters:
outputName- the name of the output.- Returns:
- an appropriate
OutputEnabledfor the second-level.
-
combine
protected abstract boolean combine(boolean first, boolean second)Determines whether an output is enabled via a combination of the twoMultiLevelOutputEnabled.- Parameters:
first- whetherenabled1is enabled.second- whetherenabled2is enabled.- Returns:
- whether the combined output is enabled.
-
combineSecond
protected abstract SingleLevelOutputEnabled combineSecond(SingleLevelOutputEnabled first, SingleLevelOutputEnabled second)Builds a second-level output by combiningenabled1andenabled2.- Parameters:
first- theMultiLevelOutputEnabledcorresponding toenabled1.second- theMultiLevelOutputEnabledcorresponding toenabled2.- Returns:
- the combined output.
-