???????????????÷???API?У??????????????????????????????????????????????????????????????????????????Σ??????????????????????????????????е????β??????????……

???????磬??????δ???
private static List<DataPoint> createListWithZerosForTimeInterval(DateTime from??
DateTime to??
ImmutableSet<Metric<? extends Number>> metrics) {
List<DataPoint> points = new ArrayList<>();
for (int i = 0; i <= Days.daysBetween(from?? to).getDays(); i++) {
points.add(new DataPoint().withDatas(createDatasWithZeroValues(metrics))
.withDayOfYear(from.withZone(DateTimeZone.UTC)
.plusDays(i)
.withTimeAtStartOfDay()));
}
return points;
}
???????Days??Minutes??Hours??Weeks ??Months???????????????沿?????Щ????????Joda-Time Java????????API???????????????????з???????????????????Щ???????ε??????days????????
??????????????ò?????η??????????????С??????????????????switch/case???????????????????
??????????????switch/case=??? ?????????????????????????????????????????????????????????κδ?????????switch/case????????????????Υ???????????????????????????????????д???????????????????????????????????Robert C. Martin???????
?????????棬????????????????????????????????????????????????????????????????????????????1??
??????????????“???????Java8???????????Щ?μ???????????swtich/case??Σ????????”?????Java8???? functions??????????£????????????????????????????????????????????Ρ?