package com.valencia.jutils.jvm;
/**
 * 
 */

/**
 * Used for introspecting the current OS platform.
 * 
 * @author gee4vee@me.com
 */
public enum Platform {
	
	WINDOWS, LINUX, MAC_OS, AIX, 
	
	/**
	 * Used to indicate any platform.
	 */
	ALL,
	;
	
	public static Platform get() {
		String os = System.getProperty("os.name");
		
		if (os.toLowerCase().contains("win")) {
			return Platform.WINDOWS;
		}
		
		if (os.equals("Mac OS X")) {
			return Platform.MAC_OS;
		}
		
		return Platform.LINUX;
	}

}

package com.valencia.jutils.jvm;
/**
 * 
 */

/**
 * Used for introspecting the current OS platform.
 * 
 * @author gee4vee@me.com
 */
public enum Platform {
	
	WINDOWS, LINUX, MAC_OS, AIX,
	;
	
	public static Platform get() {
		String os = System.getProperty("os.name");
		
		if (os.toLowerCase().contains("win")) {
			return Platform.WINDOWS;
		}
		
		if (os.equals("Mac OS X")) {
			return Platform.MAC_OS;
		}
		
		return Platform.LINUX;
	}

}

--- 
+++ 
@@ -10,7 +10,12 @@
  */
 public enum Platform {
 	
-	WINDOWS, LINUX, MAC_OS, AIX,
+	WINDOWS, LINUX, MAC_OS, AIX, 
+	
+	/**
+	 * Used to indicate any platform.
+	 */
+	ALL,
 	;
 	
 	public static Platform get() {
Add any platform enum constant.