Java String Value Of valueOf(String s, Class e)

Here you can find the source of valueOf(String s, Class e)

Description

value Of

License

Open Source License

Declaration

public static <E extends Enum<E>> E valueOf(String s, Class<E> e) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

public class Main {
    public static <E extends Enum<E>> E valueOf(String s, Class<E> e) {
        try {// w w  w.  j  a v a  2 s.  com
            return Enum.valueOf(e, s);
        } catch (IllegalArgumentException ex) {
            ex.printStackTrace();
        }
        return null;
    }
}

Related

  1. valueOf(String s)
  2. valueOf(String s)
  3. valueOf(String s)
  4. valueOf(String s)
  5. valueOf(String s)
  6. valueOf(String s, int def)
  7. valueOf(String str)
  8. valueOf(String str)
  9. valueOf(String stringVal, boolean dVal)