protected final <T> StyleSupplier<T> createStyleSupplier(
            final Template template,
            final String styleRef) {
        return new StyleSupplier<T>() {
            @Override
            public Style load(
                    final MfClientHttpRequestFactory requestFactory,
                    final T featureSource) {
                final StyleParser parser = AbstractGridCoverageLayerPlugin.this.styleParser;
                return OptionalUtils.or(
                        () -> template.getStyle(styleRef),
                        () -> parser.loadStyle(template.getConfiguration(), requestFactory, styleRef))
                        .orElse(template.getConfiguration().getDefaultStyle(NAME));
            }
        };
    }
protected final < T > StyleSupplier < T > createStyleSupplier ( final Template template , final String styleRef ) { return new StyleSupplier < T > ( ) { @ Override public Style load ( final MfClientHttpRequestFactory requestFactory , final T featureSource ) { final StyleParser parser = AbstractGridCoverageLayerPlugin . this . styleParser ; return OptionalUtils . or ( ( ) -> template . getStyle ( styleRef ) , ( ) -> parser . loadStyle ( template . getConfiguration ( ) , requestFactory , styleRef ) ) . orElse ( template . getConfiguration ( ) . getDefaultStyle ( NAME ) ) ; } } ; }
Common method for creating styles.

@param template the template that the map is part of
@param styleRef the style ref identifying the style
@param <T> the source type