public class FilePropertyLoader extends Object implements PropertyLoader
Constructor and Description |
---|
FilePropertyLoader(String path)
Creates a file property loader.
|
Modifier and Type | Method and Description |
---|---|
String |
getProperty(String key)
Gets the value mapped with the specified key.
|
String |
getProperty(String key,
String defaultValue)
Gets the value mapped with the specified key or a default value.
|
public FilePropertyLoader(String path)
path
- the properties file path.@Nullable public String getProperty(String key)
PropertyLoader
getProperty
in interface PropertyLoader
key
- the key.null
if the property is not found.public String getProperty(String key, String defaultValue)
PropertyLoader
getProperty
in interface PropertyLoader
key
- the key.defaultValue
- the default value.