??Java 8?????????????
???????????? ???????[ 2014/12/16 14:13:51 ] ????????Java API ???????
???????????????÷???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??????????£????????????????????????????????????????????Ρ?
??????
???·???
??????????????????
2023/3/23 14:23:39???д?ò??????????
2023/3/22 16:17:39????????????????????Щ??
2022/6/14 16:14:27??????????????????????????
2021/10/18 15:37:44???????????????
2021/9/17 15:19:29???·???????·
2021/9/14 15:42:25?????????????
2021/5/28 17:25:47??????APP??????????
2021/5/8 17:01:11