public static Aggregator fromString(String name){
  if (name != null && !name.isEmpty()) {
    for (    Aggregator aggregator : Aggregator.values()) {
      if (name.equalsIgnoreCase(aggregator.name())) {
        return aggregator;
      }
    }
  }
  return null;
}

public static Aggregator fromString ( String name ) { if ( name != null && ! name . isEmpty ( ) ) { for ( Aggregator aggregator : Aggregator . values ( ) ) { if ( name . equalsIgnoreCase ( aggregator . name ( ) ) ) { return aggregator ; } } } return null ; }
returns the element corresponding to the given name .
