Class SingleLevelBinary

Object
SingleLevelBinary
All Implemented Interfaces:
SingleLevelOutputEnabled
Direct Known Subclasses:
SingleLevelAnd, SingleLevelOr

public abstract class SingleLevelBinary extends Object implements SingleLevelOutputEnabled
Base class for a SingleLevelOutputEnabled that combines two existing such classes.
Author:
Owen Feehan
  • Constructor Details

    • SingleLevelBinary

      protected SingleLevelBinary(SingleLevelOutputEnabled enabled1, SingleLevelOutputEnabled enabled2)
      Creates a new SingleLevelBinary instance.
      Parameters:
      enabled1 - The first source of output-names that are enabled.
      enabled2 - The second source of output-names that are enabled.
  • Method Details

    • isOutputEnabled

      public boolean isOutputEnabled(String outputName)
      Description copied from interface: SingleLevelOutputEnabled
      Is a particular a particular output-enabled?
      Specified by:
      isOutputEnabled in interface SingleLevelOutputEnabled
      Parameters:
      outputName - the name of the output
      Returns:
      true iff the output is allowed
    • combine

      protected abstract boolean combine(boolean first, boolean second)
      Determines whether an output is enabled via a combination of the two MultiLevelOutputEnabled.
      Parameters:
      first - whether enabled1 is enabled.
      second - whether enabled2 is enabled.
      Returns:
      whether the combined output is enabled.