public class WeatherAggregator {
private List<WeatherSource> weatherSources;
public WeatherAggregator(List<WeatherSource> weatherSources) {
this.weatherSources = weatherSources;
}
public double getTemperature() {
return weatherSources
.stream()
.mapToDouble(WeatherSource::getTemperatureCelcius)
.average()
.getAsDouble();
}
}
我搜索了&amp; amp;符号在这里意味着但我找不到它的任何意义?! 你能告诉我们这行是怎么回事吗?
private List<WeatherSource>weatherSources;
答案 0 :(得分:4)
这只是<
和>
的HTML源代码编码。以下内容:
List<WeatherSource>
实际上是
List<WeatherSource>
请参阅此处查看HTML escape characters