public static Optional < BeaufortLevel > findBeaufortLevel ( PointForecast pointForecast ) { if ( pointForecast == null || pointForecast . getWindSpeed ( ) == null ) { return Optional . empty ( ) ; } return Optional . ofNullable ( findUnitById ( pointForecast . getWindSpeed ( ) . getBeaufort ( ) ) ) ; }
Find matching Beaufort level for a given point forecast .