예제 #1
0
 @Override
 public void unparkVehicle() {
   if (availableParking < capacity) {
     availableParking++;
   } else {
     DebugLib.stopSystemAndReportInconsistency(
         "trying to unpark vehicle from empty parking - parkingId:" + id + "");
   }
 }
예제 #2
0
 @Override
 public void parkVehicle() {
   if (availableParking > 0) {
     availableParking--;
   } else {
     DebugLib.stopSystemAndReportInconsistency(
         "trying to park vehicle on full parking - parkingId:" + id + ";");
   }
 }