public boolean canReceive(Gas gas){
  if (getNeeded() == 0 || stored != null && (gas != null && gas != stored.getGas())) {
    return false;
  }
  return true;
}

public boolean canReceive ( Gas gas ) { if ( getNeeded ( ) == 0 || stored != null && ( gas != null && gas != stored . getGas ( ) ) ) { return false ; } return true ; }
if this gastank can receive the specified type of gas . will return false if this tank does not need anymore gas .
