Class MultiLevelBinary
Object
MultiLevelBinary
- All Implemented Interfaces:
MultiLevelOutputEnabled,SingleLevelOutputEnabled
- Direct Known Subclasses:
MultiLevelAnd,MultiLevelOr
Base class for operations that combines two
MultiLevelOutputEnableds.- Author:
- Owen Feehan
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedMultiLevelBinary(MultiLevelOutputEnabled enabled1, MultiLevelOutputEnabled enabled2) Creates a newMultiLevelBinaryinstance. -
Method Summary
Modifier and TypeMethodDescriptionprotected 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?A second-level ofOutputEnabledfor a particularoutputNameas used in first-level.
-
Constructor Details
-
MultiLevelBinary
Creates a newMultiLevelBinaryinstance.- Parameters:
enabled1- The first source of output-names that are enabled.enabled2- The second source of output-names that are enabled.
-
-
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.
-