public final class PropertiesBuilder extends Object
Simple builder class for creating instances of Properties
Modifier and Type | Class and Description |
---|---|
class |
PropertiesBuilder.PrefixedPropertiesBuilder |
Modifier and Type | Method and Description |
---|---|
Properties |
build()
Return the created Properties instance
|
static PropertiesBuilder |
create()
Create a new PropertiesBuilder
|
static PropertiesBuilder |
create(Properties theProps)
Create a new PropertiesBuilder
|
static Properties |
propertiesFromString(String theContents) |
static String |
propertiesToString(Properties properties) |
PropertiesBuilder |
remove(String theKey)
Remove the specified property
|
PropertiesBuilder |
set(String theKey,
String theValue)
Set the specified property key-value pair
|
PropertiesBuilder |
setFalse(String theKey) |
PropertiesBuilder |
setTrue(String theKey) |
String |
toString() |
PropertiesBuilder.PrefixedPropertiesBuilder |
withPrefix(String thePrefix) |
public static PropertiesBuilder create()
public static PropertiesBuilder create(Properties theProps)
theProps
- create a new builder starting from the provided set of properties. A copy of these properties are made, the original remains unaltered by the builder.public PropertiesBuilder set(String theKey, String theValue)
theKey
- the keytheValue
- the valuepublic PropertiesBuilder remove(String theKey)
theKey
- the keypublic PropertiesBuilder setTrue(String theKey)
public PropertiesBuilder setFalse(String theKey)
public PropertiesBuilder.PrefixedPropertiesBuilder withPrefix(String thePrefix)
public Properties build()
public static String propertiesToString(Properties properties)
public static Properties propertiesFromString(String theContents)
Copyright © 2010-2016 Stardog Union. All Rights Reserved.