示例#1
0
  /**
   * Actual implementation of meetsInput(), performs the checks.
   *
   * @param input - input to check
   * @return if the input meets this input's requirements
   */
  public boolean meets(PressurizedInput input) {
    if (input == null || !input.isValid()) {
      return false;
    }

    if (!(StackUtils.equalsWildcard(input.theSolid, theSolid)
        && input.theFluid.isFluidEqual(theFluid)
        && input.theGas.isGasEqual(theGas))) {
      return false;
    }

    return input.theSolid.stackSize >= theSolid.stackSize
        && input.theFluid.amount >= theFluid.amount
        && input.theGas.amount >= theGas.amount;
  }
示例#2
0
 @Override
 public boolean testEquality(PressurizedInput other) {
   return other.containsType(theSolid)
       && other.containsType(theFluid)
       && other.containsType(theGas);
 }