얻기이 오류 :정수 호환되지 않는 Joda와 자바 랭
incompatible types
required: java.lang.Integer
found: java.util.Map.Entry<org.joda.time.DateTime.java.lang.Integer>
및 오류의 결과 코드 :
public static void checkRange() {
DateTime startx = new DateTime(startDate.getTime());
DateTime endx = new DateTime(endDate.getTime());
//produces submap
Map<DateTime, Integer> nav = map.subMap(startx, endx);
//this is the line causing the error:
for (Integer capacity : map.subMap(startx, endx).entrySet()) {
}
}
}
은의 startDate 및 종료 날짜 이전 다음 내가 유 여기에 변환 날짜로 정의 내가 한 DateTime을 볼 수 있습니다. 나는 그 문제 생각 해달라고지도 그것은 당신이 원하는 것 같아
public static TreeMap<DateTime, Integer> map = new TreeMap<DateTime, Integer>();
감사합니다,
브릴리언트 : D 오류가 없어져서 고맙습니다 ... 분명히 알지 못하는 좋은 설명입니다. –