public final class SystemPropertyUtil
extends java.lang.Object
限定符和类型 | 方法和说明 |
---|---|
static boolean |
contains(java.lang.String key)
Returns
true if and only if the system property with the specified key
exists. |
static java.lang.String |
get(java.lang.String key)
Returns the value of the Java system property with the specified
key , while falling back to null if the property access fails. |
static java.lang.String |
get(java.lang.String key,
java.lang.String def)
Returns the value of the Java system property with the specified
key , while falling back to the specified default value if
the property access fails. |
static boolean |
getBoolean(java.lang.String key,
boolean def)
Returns the value of the Java system property with the specified
key , while falling back to the specified default value if
the property access fails. |
static int |
getInt(java.lang.String key,
int def)
Returns the value of the Java system property with the specified
key , while falling back to the specified default value if
the property access fails. |
static long |
getLong(java.lang.String key,
long def)
Returns the value of the Java system property with the specified
key , while falling back to the specified default value if
the property access fails. |
public static boolean contains(java.lang.String key)
true
if and only if the system property with the specified key
exists.public static java.lang.String get(java.lang.String key)
key
, while falling back to null
if the property access fails.null
public static java.lang.String get(java.lang.String key, java.lang.String def)
key
, while falling back to the specified default value if
the property access fails.def
if there's no such property or if an access to the
specified property is not allowed.public static boolean getBoolean(java.lang.String key, boolean def)
key
, while falling back to the specified default value if
the property access fails.def
if there's no such property or if an access to the
specified property is not allowed.public static int getInt(java.lang.String key, int def)
key
, while falling back to the specified default value if
the property access fails.def
if there's no such property or if an access to the
specified property is not allowed.public static long getLong(java.lang.String key, long def)
key
, while falling back to the specified default value if
the property access fails.def
if there's no such property or if an access to the
specified property is not allowed.