计算if语句中的3周数据

时间:2015-03-31 02:35:57

标签: java

如何将整数转换为布尔值?因为我需要在if语句中计算3周的数据,但我遇到了这个错误。请建议谢谢你

    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;
                }

            }

1 个答案:

答案 0 :(得分:0)

您需要更改

 if (ShipmentForecast.size == 40){

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