Advertisement
Guest User

GarciaPL

a guest
Jan 20th, 2016
142
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.68 KB | None | 0 0
  1. package pl.garciapl.test;
  2.  
  3. import org.springframework.format.Formatter;
  4. import org.springframework.format.FormatterRegistrar;
  5. import org.springframework.format.FormatterRegistry;
  6.  
  7. import java.util.HashSet;
  8. import java.util.Set;
  9.  
  10. public class CurrencyLocaleFormatterRegistrar implements FormatterRegistrar {
  11.  
  12.     private Set<Formatter> formatters = new HashSet<>();
  13.  
  14.     public CurrencyLocaleFormatterRegistrar(Set<Formatter> formatters) {
  15.         this.formatters = formatters;
  16.     }
  17.  
  18.     @Override
  19.     public void registerFormatters(FormatterRegistry registry) {
  20.         for (Formatter element : this.formatters) {
  21.             registry.addFormatter(element);
  22.         }
  23.     }
  24. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement