package rhogenwizard;

public class OSValidator
{
	public enum OSType
	{
		MACOS,
		WINDOWS,
		UNIXLIKE,
		UNDEFINED,
	};
	
	public static OSType detect()
	{
		if(isWindows()){
			return OSType.WINDOWS;
		}else if(isMac()){
			return OSType.MACOS;
		}else if(isUnix()){
			return OSType.UNIXLIKE;
		}
		
		return OSType.UNDEFINED;
	}
 
	public static boolean isWindows(){
 
		String os = System.getProperty("os.name").toLowerCase();
		//windows
	    return (os.indexOf( "win" ) >= 0); 
 
	}
 
	public static boolean isMac(){
 
		String os = System.getProperty("os.name").toLowerCase();
		//Mac
	    return (os.indexOf( "mac" ) >= 0); 
 
	}
 
	public static boolean isUnix(){
 
		String os = System.getProperty("os.name").toLowerCase();
		//linux or unix
	    return (os.indexOf( "nix") >=0 || os.indexOf( "nux") >=0);
 
	}
}
@@ -195,24 +195,25 @@
 WINDOWS;%0A%09%09%7D
+ 
 else if(isMa
@@ -216,24 +216,25 @@
 isMac())%7B%0A%09%09
+ 
 %09return OSTy
@@ -246,16 +246,17 @@
 COS;%0A%09%09%7D
+ 
 else if(
@@ -366,18 +366,19 @@
 indows()
-%7B
 %0A
+%09%7B
  %0A%09%09Stri
@@ -474,33 +474,32 @@
  %22win%22 ) %3E= 0); 
-%0A
  %0A%09%7D%0A %0A%09public s
@@ -519,18 +519,19 @@
  isMac()
-%7B
 %0A
+%09%7B
  %0A%09%09Stri
@@ -631,17 +631,16 @@
  %3E= 0); 
-%0A
  %0A%09%7D%0A %0A%09
@@ -669,18 +669,19 @@
 isUnix()
-%7B
 %0A
+%09%7B
  %0A%09%09Stri
@@ -814,15 +814,14 @@
 %22) %3E=0);
-%0A
  %0A%09%7D%0A%7D

remove white space