如何将整数转换为布尔值?因为我需要在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;
}
}
答案 0 :(得分:0)
您需要更改
if (ShipmentForecast.size == 40){
到
if (ShipmentForecast.size() == 40){