public static Function fromString(String name){
  if (name != null) {
    for (    Function func : Function.values()) {
      if (name.equalsIgnoreCase(func.getName())) {
        return func;
      }
    }
  }
  throw new IllegalArgumentException(name);
}

public static Function fromString ( String name ) { if ( name != null ) { for ( Function func : Function . values ( ) ) { if ( name . equalsIgnoreCase ( func . getName ( ) ) ) { return func ; } } } throw new IllegalArgumentException ( name ) ; }
returns the function element corresponding to the name .
