View Javadoc

1   package org.helyx.basics4me.lang;
2   
3   public class SystemUtil {
4   
5   	private SystemUtil() {
6   		super();
7   	}
8   	
9   	public static String getProperty(String systemProperty, String defaultValue) {
10  		String systemPropertyValue = java.lang.System.getProperty(systemProperty);
11  		if (systemPropertyValue == null) {
12  			return defaultValue;
13  		}
14  		
15  		return systemPropertyValue;
16  	}
17  	
18  	public static boolean getBooleanProperty(String systemProperty, boolean defaultValue) {
19  		String systemPropertyValue = java.lang.System.getProperty(systemProperty);
20  		if (systemPropertyValue == null) {
21  			return defaultValue;
22  		}
23  		
24  		return BooleanUtil.TRUE.equals(systemPropertyValue);
25  	}
26  
27  	
28  }