2015-03-31 92 views
0

如何將整數轉換爲布爾值?因爲我需要計算if語句中的3週數據,但我遇到此錯誤。請告知您計算3週數據if語句

for (int i = 0; i < ShipmentForecast.size(); i++){ 
CalendarUtils.AddDaysToDate(getDate(ShipmentForecast.get(i).dateBucket), 21)), 
      if (start == false){ 
      if (ShipmentForecast.get(i).dateBucket.compareTo(startDateCal) >= 0){ 

      } 
       if (ShipmentForecast.size == 40){ 

       } 
       DateTime date = DateTime.parse(
         ShipmentForecast.get(i).dateBucket, 
         DateTimeFormat.forPattern(SCPMFormatConstants.DATE_MCV)) 
         .withTimeAtStartOfDay(); 

       if ((date.equals(currentWeekStart)) || (date.isAfter(currentWeekStart))) { 

        start = true; 
       } 

      } 
+0

什麼是你想轉換謝謝?你有嘗試過嗎? – Zizouz212 2015-03-31 02:53:59

回答

0

您需要更改

if (ShipmentForecast.size == 40){ 

if (ShipmentForecast.size() == 40){ 
+0

謝謝你,對不起,我沒有足夠的意見接受這個答案。順便說一句,謝謝你的回答 – 2015-03-31 02:45:15

+0

我認爲你需要等一會兒,然後才能開始接受和接受。請稍等片刻 – 2015-03-31 02:46:23