View getViewWithKey ( String key ) { if ( key == null ) { throw new IllegalArgumentException ( "A key must be specified." ) ; } Set < View > views = new HashSet <> ( ) ; views . addAll ( systemLandscapeViews ) ; views . addAll ( systemContextViews ) ; views . addAll ( containerViews ) ; views . addAll ( componentViews ) ; views . addAll ( dynamicViews ) ; views . addAll ( deploymentViews ) ; return views . stream ( ) . filter ( v -> key . equals ( v . getKey ( ) ) ) . findFirst ( ) . orElse ( null ) ; }
Finds the view with the specified key or null if the view does not exist .