Package pcap.common.util
Class Properties
java.lang.Object
pcap.common.util.Properties
@Inclubating public final class Properties extends Object
- Author:
- Ardika Rommy Sanjaya
-
Constructor Summary
Constructors Constructor Description Properties()
-
Method Summary
Modifier and Type Method Description static boolean
getBoolean(String key, boolean defaultValue)
Returns the value of the Java system property with the specifiedkey
, while falling back to the specified default value if the property access fails.static int
getInt(String key, int defaultValue)
Returns the value of the Java system property with the specifiedkey
, while falling back to the specified default value if the property access fails.static long
getLong(String key, long defaultValue)
Returns the value of the Java system property with the specifiedkey
, while falling back to the specified default value if the property access fails.static String
getProperty(String key)
Returns the value of the Java system property with the specifiedkey
, while falling back to the specified default value if the property access fails.static String
getProperty(String key, String defaultValue)
Returns the value of the Java system property with the specifiedkey
, while falling back to the specified default value if the property access fails.
-
Constructor Details
-
Properties
public Properties()
-
-
Method Details
-
getProperty
Returns the value of the Java system property with the specifiedkey
, while falling back to the specified default value if the property access fails.- Parameters:
key
- key.- Returns:
- returns the property value. null if there's no such property or if an access to the specified property is not allowed.
- Since:
- 1.2.3
-
getProperty
Returns the value of the Java system property with the specifiedkey
, while falling back to the specified default value if the property access fails.- Parameters:
key
- key.defaultValue
- default value.- Returns:
- the property value.
defaultValue
if there's no such property or if an access to the specified property is not allowed. - Since:
- 1.2.3
-
getBoolean
Returns the value of the Java system property with the specifiedkey
, while falling back to the specified default value if the property access fails.- Parameters:
key
- key.defaultValue
- default value.- Returns:
- the property value.
defaultValue
if there's no such property or if an access to the specified property is not allowed. - Since:
- 1.2.6
-
getInt
Returns the value of the Java system property with the specifiedkey
, while falling back to the specified default value if the property access fails.- Parameters:
key
- key.defaultValue
- default value.- Returns:
- the property value.
defaultValue
if there's no such property or if an access to the specified property is not allowed. - Since:
- 1.2.6
-
getLong
Returns the value of the Java system property with the specifiedkey
, while falling back to the specified default value if the property access fails.- Parameters:
key
- key.defaultValue
- default value.- Returns:
- the property value.
defaultValue
if there's no such property or if an access to the specified property is not allowed. - Since:
- 1.2.6
-