public static Type fromString(String typeString){
  for (  Type t : Type.values()) {
    if (typeString.equals(t.value)) {
      return t;
    }
  }
  return null;
}

public static Type fromString ( String typeString ) { for ( Type t : Type . values ( ) ) { if ( typeString . equals ( t . value ) ) { return t ; } } return null ; }
returns the type with value = = typestring , or null if it doesn ' t exist .
