All Implemented Interfaces:
Provider<Mask>, ProviderAsStack
Direct Known Subclasses:
And, IfHighLow, Or, Xor

public abstract class CombineBase extends MaskProviderUnary
Base class for combining two masks.
  • Constructor Details

    • CombineBase

      public CombineBase()
  • Method Details

    • createFromMask

      public Mask createFromMask(Mask mask) throws ProvisionFailedException
      Description copied from class: MaskProviderUnary
      Creates a Mask given the entity provided by the delegate.
      Specified by:
      createFromMask in class MaskProviderUnary
      Parameters:
      mask - the entity provided by the delegate.
      Returns:
      the created Mask that is returned by the provider.
      Throws:
      ProvisionFailedException - if the provider cannot complete successfully.
    • createFromTwoMasks

      protected abstract Mask createFromTwoMasks(Mask maskToModify, Mask maskOther) throws ProvisionFailedException
      Creates a mask from some combination of two masks.
      Parameters:
      maskToModify - first mask (which is also the mask modified with the result)
      maskOther - second mask (which is not modified)
      Returns:
      either maskToModify or maskOther depending on implementation
      Throws:
      ProvisionFailedException - if the mask creation fails
    • getReceive

      public MaskProvider getReceive()
      The MaskProvider for the second mask to be combined.
    • setReceive

      public void setReceive(MaskProvider receive)
      The MaskProvider for the second mask to be combined.