java.lang.Object
org.refcodes.runtime.PropertyBuilderImpl
- All Implemented Interfaces:
org.refcodes.mixin.KeyAccessor<String>,org.refcodes.mixin.KeyAccessor.KeyBuilder<String,PropertyBuilder>,org.refcodes.mixin.KeyAccessor.KeyMutator<String>,org.refcodes.mixin.KeyAccessor.KeyProperty<String>,PropertyBuilder
public class PropertyBuilderImpl extends Object implements PropertyBuilder
The Class PropertyBuilderImpl.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.refcodes.mixin.KeyAccessor
org.refcodes.mixin.KeyAccessor.KeyBuilder<K extends Object,B extends org.refcodes.mixin.KeyAccessor.KeyBuilder<K,B>>, org.refcodes.mixin.KeyAccessor.KeyMutator<K extends Object>, org.refcodes.mixin.KeyAccessor.KeyProperty<K extends Object> -
Constructor Summary
Constructors Constructor Description PropertyBuilderImpl() -
Method Summary
Modifier and Type Method Description StringgetEnvironmentVariable(String aKey)Returns the according environment variable after having converted the provided key to an environment variable.StringgetKey()StringgetSystemProperty(String aKey)Returns the according system's property after having converted the provided key to a system property.voidsetKey(String aKey)StringtoEnvironmentVariable(String aKey)Converts the provided key to an environment variable.StringtoPath(String aKey)Converts the provided key as ofKeyAccessor.getKey()to a path (as ofPathMap).StringtoSystemProperty(String aKey)Converts the provided key to a system property.PropertyBuilderwithKey(String aKey)Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.refcodes.mixin.KeyAccessor.KeyProperty
letKeyMethods inherited from interface org.refcodes.runtime.PropertyBuilder
getEnvironmentVariable, getSystemProperty, toEnvironmentVariable, toPath, toSystemProperty
-
Constructor Details
-
PropertyBuilderImpl
public PropertyBuilderImpl()
-
-
Method Details
-
getKey
- Specified by:
getKeyin interfaceorg.refcodes.mixin.KeyAccessor<String>
-
setKey
- Specified by:
setKeyin interfaceorg.refcodes.mixin.KeyAccessor.KeyMutator<String>
-
withKey
- Specified by:
withKeyin interfaceorg.refcodes.mixin.KeyAccessor.KeyBuilder<String,PropertyBuilder>
-
toPath
Converts the provided key as ofKeyAccessor.getKey()to a path (as ofPathMap). A path begins with a path delimiter "/" (as ofDelimiter.PATHand with all non alphanumeric digits being replaced by the path delimiter. Any non alphanumeric sequence is truncated to a single path delimiter.- Specified by:
toPathin interfacePropertyBuilder- Parameters:
aKey- The key to be converted.- Returns:
- The path representation of the according key.
-
toSystemProperty
Converts the provided key to a system property. A system property is the camel-case version of the according key.- Specified by:
toSystemPropertyin interfacePropertyBuilder- Parameters:
aKey- The key to be converted.- Returns:
- The camel-case representation of the according key.
-
toEnvironmentVariable
Converts the provided key to an environment variable. An environment variable is the upper-case snake-case version of the according key.- Specified by:
toEnvironmentVariablein interfacePropertyBuilder- Parameters:
aKey- The key to be converted.- Returns:
- The upper-case snake-case representation of the according key.
-
getSystemProperty
Returns the according system's property after having converted the provided key to a system property. A system property is the camel-case version of the according key.- Specified by:
getSystemPropertyin interfacePropertyBuilder- Parameters:
aKey- The value of the key to be converted.- Returns:
- The system's property of the camel-case representation of the according key.
-
getEnvironmentVariable
Returns the according environment variable after having converted the provided key to an environment variable. An environment variable is the upper-case snake-case version of the according key.- Specified by:
getEnvironmentVariablein interfacePropertyBuilder- Parameters:
aKey- The value of the key to be converted.- Returns:
- The environment variable of the upper-case snake-case representation of the according key.
-