Package com.github.ngoanh2n
Class Property<T>
java.lang.Object
com.github.ngoanh2n.Property<T>
Represent a JVM system property.
Repository:
Repository:
- GitHub: ngoanh2n/commons
- Maven: com.github.ngoanh2n:commons
- Since:
- 2019
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Remove the JVM system property indicated by the specified key.Get the default value of the JVM system property.getName()
Get the name of the JVM system property.getType()
Get the class type of the JVM system property.getValue()
Get the value of the JVM system property.protected boolean
Whether property value was reassigned viaProperty.setValue(newValue)
.void
Set the JVM system property indicated by the specified key.
-
Constructor Details
-
Property
Construct a newProperty
.- Parameters:
name
- The name of the JVM system property.type
- The class type of the JVM system property.
-
Property
Construct a newProperty
.- Parameters:
name
- The name of the JVM system property.type
- The class type of the JVM system property.defaultValue
- The default value of the JVM system property.
-
-
Method Details
-
ofString
- Parameters:
name
- The name of the JVM system property.- Returns:
- The
Property
.
-
ofString
- Parameters:
name
- The name of the JVM system property.defaultValue
- The default value of the JVM system property.- Returns:
- The
Property
.
-
ofBoolean
- Parameters:
name
- The name of the JVM system property.- Returns:
- The
Property
.
-
ofBoolean
- Parameters:
name
- The name of the JVM system property.defaultValue
- The default value of the JVM system property.- Returns:
- The
Property
.
-
ofInteger
- Parameters:
name
- The name of the JVM system property.- Returns:
- The
Property
.
-
ofInteger
- Parameters:
name
- The name of the JVM system property.defaultValue
- The default value of the JVM system property.- Returns:
- The
Property
.
-
ofLong
- Parameters:
name
- The name of the JVM system property.- Returns:
- The
Property
.
-
ofLong
- Parameters:
name
- The name of the JVM system property.defaultValue
- The default value of the JVM system property.- Returns:
- The
Property
.
-
ofFloat
- Parameters:
name
- The name of the JVM system property.- Returns:
- The
Property
.
-
ofFloat
- Parameters:
name
- The name of the JVM system property.defaultValue
- The default value of the JVM system property.- Returns:
- The
Property
.
-
ofDouble
- Parameters:
name
- The name of the JVM system property.- Returns:
- The
Property
.
-
ofDouble
- Parameters:
name
- The name of the JVM system property.defaultValue
- The default value of the JVM system property.- Returns:
- The
Property
.
-
getName
Get the name of the JVM system property.- Returns:
- the JVM system property name.
-
getType
Get the class type of the JVM system property.- Returns:
- the class type of JVM system property name.
-
getValue
Get the value of the JVM system property.- Returns:
- the JVM system property value.
-
setValue
Set the JVM system property indicated by the specified key.- Parameters:
newValue
- The value of the JVM system property.
-
clearValue
public void clearValue()Remove the JVM system property indicated by the specified key. -
getDefaultValue
Get the default value of the JVM system property.- Returns:
- the JVM system property object.
-
isReassigned
protected boolean isReassigned()Whether property value was reassigned viaProperty.setValue(newValue)
.- Returns:
- Indicate property value was reassigned.
-