Package com.complexible.common.base
Class SystemUtil
- java.lang.Object
-
- com.complexible.common.base.SystemUtil
-
public final class SystemUtil extends java.lang.ObjectUtility methods for working with
System, particularly safe, default value supported lookups intoSystem.getProperty(java.lang.String)and other OS/system level calls.- Since:
- 2.0
- Version:
- 2.0 (0.6.5)
- Author:
- Michael Grove
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.lang.StringgetProperty(java.lang.String theProperty, java.lang.String theDefault)static booleangetPropertyAsBoolean(java.lang.String theProperty, boolean theDefault)static doublegetPropertyAsDouble(java.lang.String theProperty, double theDefault)static intgetPropertyAsInt(java.lang.String theProperty, int theDefault)static longgetPropertyAsLong(java.lang.String theProperty, long theDefault)static <T extends java.lang.Number>
TgetPropertyAsNumber(java.lang.String theProperty, java.util.function.Function<java.lang.String,T> theParser, T theDefault)
-
-
-
Method Detail
-
getPropertyAsBoolean
public static boolean getPropertyAsBoolean(java.lang.String theProperty, boolean theDefault)
-
getPropertyAsInt
public static int getPropertyAsInt(java.lang.String theProperty, int theDefault)
-
getPropertyAsLong
public static long getPropertyAsLong(java.lang.String theProperty, long theDefault)
-
getPropertyAsDouble
public static double getPropertyAsDouble(java.lang.String theProperty, double theDefault)
-
getPropertyAsNumber
public static <T extends java.lang.Number> T getPropertyAsNumber(java.lang.String theProperty, java.util.function.Function<java.lang.String,T> theParser, T theDefault)
-
getProperty
public static java.lang.String getProperty(java.lang.String theProperty, java.lang.String theDefault)
-
-