public final class ConfigProperty
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
ConfigProperty.Type
Representation of the type of property value.
|
Modifier and Type | Method and Description |
---|---|
boolean |
asBoolean()
Returns the property value as a boolean.
|
byte |
asByte()
Returns the property value as a byte.
|
double |
asDouble()
Returns the property value as a double.
|
float |
asFloat()
Returns the property value as a float.
|
int |
asInteger()
Returns the property value as an integer.
|
long |
asLong()
Returns the property value as a long.
|
java.lang.String |
asString()
Returns the property value as a string.
|
java.lang.String |
defaultValue()
Returns the property default value as a string.
|
static ConfigProperty |
defineProperty(java.lang.String name,
ConfigProperty.Type type,
java.lang.String defaultValue,
java.lang.String description)
Creates a new configuration property with its default value.
|
java.lang.String |
description()
Returns the property description.
|
boolean |
equals(java.lang.Object obj)
Equality is considered only on the basis of property name.
|
int |
hashCode() |
boolean |
isSet()
Indicates whether the property is set or whether it assumes its
default value.
|
java.lang.String |
name()
Returns the property name.
|
static ConfigProperty |
resetProperty(ConfigProperty property)
Creates a new configuration property as a copy of an existing one, but
without a specific value, thus making it take its default value.
|
static ConfigProperty |
setProperty(ConfigProperty property,
java.lang.String newValue)
Creates a new configuration property as a copy of an existing one, but
with a new value.
|
java.lang.String |
toString() |
ConfigProperty.Type |
type()
Returns the property type.
|
java.lang.String |
value()
Returns the property value as a string.
|
public static ConfigProperty defineProperty(java.lang.String name, ConfigProperty.Type type, java.lang.String defaultValue, java.lang.String description)
name
- property nametype
- value typedefaultValue
- default value as a stringdescription
- property descriptionpublic static ConfigProperty setProperty(ConfigProperty property, java.lang.String newValue)
property
- property to be changednewValue
- new value as a stringpublic static ConfigProperty resetProperty(ConfigProperty property)
property
- property to be resetpublic java.lang.String name()
public ConfigProperty.Type type()
public java.lang.String description()
public java.lang.String defaultValue()
public java.lang.String value()
public boolean isSet()
public java.lang.String asString()
public byte asByte()
public int asInteger()
public long asLong()
public float asFloat()
public double asDouble()
public boolean asBoolean()
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object