public DashboardMenuItem getByViewName(final String viewName) {
        final Optional<DashboardMenuItem> findFirst = dashboardVaadinViews.stream()
                .filter(view -> view.getViewName().equals(viewName)).findAny();

        if (!findFirst.isPresent()) {
            return null;
        }

        return findFirst.get();
    }
public DashboardMenuItem getByViewName ( final String viewName ) { final Optional < DashboardMenuItem > findFirst = dashboardVaadinViews . stream ( ) . filter ( view -> view . getViewName ( ) . equals ( viewName ) ) . findAny ( ) ; if ( ! findFirst . isPresent ( ) ) { return null ; } return findFirst . get ( ) ; }
Returns the dashboard view type by a given view name.

@param viewName
the name of the view to retrieve
@return the dashboard view for a given viewname or {@code null} if view
with given viewname does not exists