public static < T > Decorator < T > decorate ( T delegate , Map < String , Function < T , Object > > mappings , String delegateKey , Configuration configuration ) { return IterableDecorator . isIterable ( delegate ) ? new IterableDecorator <> ( delegate , ImmutableMap . copyOf ( mappings ) , delegateKey , configuration ) : new Decorator <> ( delegate , ImmutableMap . copyOf ( mappings ) , delegateKey , configuration ) ; }
Returns a decorator instance for the specified delegate and mappings .