@Immutable public final class PropsFile extends Object implements Props
Properties.| Constructor and Description |
|---|
PropsFile(File file)
Ctor.
|
PropsFile(Path path)
Ctor.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
containsKey(String key)
Shows whether the properties contains
a property with the specified key.
|
Set<Map.Entry<String,String>> |
entrySet()
Retrieves all properties
as a
Set of Map.Entrys. |
String |
property(String key)
Retrieves property value by key.
|
PropsFile |
with(String key,
String value)
Adds a new property.
|
public PropsFile(File file)
file - Properties.public PropsFile(Path path)
path - Path to the properties.public boolean containsKey(String key)
PropscontainsKey in interface Propskey - Property key.public Set<Map.Entry<String,String>> entrySet()
PropsSet of Map.Entrys.public String property(String key)
Propspublic PropsFile with(String key, String value) throws IOException
Propswith in interface Propskey - Property key.value - Property value.IOException - If an error occurs.Copyright © 2017–2018 jcabi.com. All rights reserved.