Esempio n. 1
0
 /**
  * Find the best transformer for the given value.
  *
  * @param candidate The candidate value.
  * @return The best transformer for the given value. Not null.
  */
 private static Transformer get(final Object candidate) {
   EnumSet<Transformer> transoformers = EnumSet.allOf(Transformer.class);
   transoformers.remove(NONE);
   for (Transformer transformer : transoformers) {
     if (transformer.apply(candidate)) {
       return transformer;
     }
   }
   return NONE;
 }