@ SuppressWarnings ( "unchecked" ) @ Nonnull public final java . util . Optional < Style > getStyle ( final String styleName ) { final String styleRef = this . styles . get ( styleName ) ; Optional < Style > style ; if ( styleRef != null ) { style = ( Optional < Style > ) this . styleParser . loadStyle ( getConfiguration ( ) , this . httpRequestFactory , styleRef ) ; } else { style = Optional . empty ( ) ; } return or ( style , this . configuration . getStyle ( styleName ) ) ; }
Look for a style in the named styles provided in the configuration .