Class AndCondition

Object
AndCondition
All Implemented Interfaces:
UpdatableBeforeCondition

public class AndCondition extends Object implements UpdatableBeforeCondition
Combines two UpdatableBeforeConditions as LOGICAL ANDs
  • Constructor Details

  • Method Details

    • updateSourceObject

      public void updateSourceObject(ObjectMask source, Optional<UnitConverter> unitConverter) throws OperationFailedException
      Description copied from interface: UpdatableBeforeCondition
      Updates the source object and performs any necessary pre-computations.
      Specified by:
      updateSourceObject in interface UpdatableBeforeCondition
      Parameters:
      source - the source ObjectMask
      unitConverter - an optional UnitConverter for unit conversions
      Throws:
      OperationFailedException - if the update operation fails
    • accept

      public boolean accept(ObjectMask destination) throws OperationFailedException
      Description copied from interface: UpdatableBeforeCondition
      Checks if the destination object should be merged with the previously set source object.
      Specified by:
      accept in interface UpdatableBeforeCondition
      Parameters:
      destination - the destination ObjectMask to check against the source
      Returns:
      true if the objects should be merged, false otherwise
      Throws:
      OperationFailedException - if the check operation fails