Class ConfigurationProperty
java.lang.Object
org.springframework.boot.context.properties.source.ConfigurationProperty
- All Implemented Interfaces:
Comparable<ConfigurationProperty>
,OriginProvider
public final class ConfigurationProperty
extends Object
implements OriginProvider, Comparable<ConfigurationProperty>
A single configuration property obtained from a
ConfigurationPropertySource
consisting of a name
, value
and optional
origin
.- Since:
- 2.0.0
-
Constructor Summary
ConstructorDescriptionConfigurationProperty
(ConfigurationPropertyName name, Object value, Origin origin) -
Method Summary
Modifier and TypeMethodDescriptionint
compareTo
(ConfigurationProperty other) boolean
getName()
Return the name of the configuration property.Return the source origin ornull
if the origin is not known.Return theConfigurationPropertySource
that provided the property ornull
if the source is unknown.getValue()
Return the value of the configuration property.int
hashCode()
toString()
-
Constructor Details
-
ConfigurationProperty
-
-
Method Details
-
getSource
Return theConfigurationPropertySource
that provided the property ornull
if the source is unknown.- Returns:
- the configuration property source
- Since:
- 2.6.0
-
getName
Return the name of the configuration property.- Returns:
- the configuration property name
-
getValue
Return the value of the configuration property.- Returns:
- the configuration property value
-
getOrigin
Description copied from interface:OriginProvider
Return the source origin ornull
if the origin is not known.- Specified by:
getOrigin
in interfaceOriginProvider
- Returns:
- the origin or
null
-
equals
-
hashCode
public int hashCode() -
toString
-
compareTo
- Specified by:
compareTo
in interfaceComparable<ConfigurationProperty>
-