All Downloads are FREE. Search and download functionalities are using the official Maven repository.

water.util.EnumUtils Maven / Gradle / Ivy

package water.util;

import java.util.Arrays;

/** Utilities to deal with Java enums. */
public class EnumUtils {
  /**
   * Return an array of Strings of all the enum levels.
   * 

* Taken from http://stackoverflow.com/questions/13783295/getting-all-names-in-an-enum-as-a-string. */ public static String[] getNames(Class> e) { return Arrays.toString(e.getEnumConstants()).replaceAll("^.|.$", "").split(", "); } }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy