private PriorityQueue<FacilityChargingPrice> updateChargingPrice(PriorityQueue<FacilityChargingPrice> chargingPrice){
  while (lastChargingPriceParkingIndex < maxChargableEnergy.size() && getMinimumEnergyThatNeedsToBeCharged() <= 0) {
    chargingPrice=addNewParkingChargingPrices(lastChargingPriceParkingIndex,chargingPrice);
    lastChargingPriceParkingIndex++;
  }
  return chargingPrice;
}

private PriorityQueue < FacilityChargingPrice > updateChargingPrice ( PriorityQueue < FacilityChargingPrice > chargingPrice ) { while ( lastChargingPriceParkingIndex < maxChargableEnergy . size ( ) && getMinimumEnergyThatNeedsToBeCharged ( ) <= 0 ) { chargingPrice = addNewParkingChargingPrices ( lastChargingPriceParkingIndex , chargingPrice ) ; lastChargingPriceParkingIndex ++ ; } return chargingPrice ; }
add the parking prices to the priority list as far as needed ( only if the car would run out of energy ) .
