Optional < PointForecast > getPointForecast ( ZonedDateTime dateTime ) { for ( Forecast forecast : forecasts ) { if ( forecast instanceof PointForecast ) { PointForecast pointForecast = ( PointForecast ) forecast ; if ( createHourIndexKey ( dateTime ) . equals ( createHourIndexKey ( cloneZonedDateTime ( pointForecast . getFrom ( ) ) ) ) ) { return Optional . of ( pointForecast ) ; } } } return Optional . empty ( ) ; }
Get the PointForecast that matches the given time .