public class ConfigurationValue extends Object implements Serializable
AmbiguousConfigurationValuesException
.AmbiguousConfigurationValuesException
,
Serialized FormConstructor and Description |
---|
ConfigurationValue(Serializable source,
Map<String,String> coordinates,
String name,
String value,
boolean authoritative)
Creates a new
ConfigurationValue . |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object other)
|
Map<String,String> |
getCoordinates()
Returns the configuration coordinates locating this
ConfigurationValue in configuration space. |
String |
getName()
Returns the name of the configuration property for which this
ConfigurationValue is a value. |
Object |
getSource()
Returns the system that created this
ConfigurationValue . |
String |
getValue()
Returns the actual value that this
ConfigurationValue
represents. |
int |
hashCode()
Returns a hashcode for this
ConfigurationValue . |
boolean |
isAuthoritative()
Returns
true if this ConfigurationValue is to be
regarded as authoritative. |
int |
specificity()
Returns the specificity of this
ConfigurationValue . |
String |
toString()
|
public ConfigurationValue(Serializable source, Map<String,String> coordinates, String name, String value, boolean authoritative)
ConfigurationValue
.source
- the system creating this ConfigurationValue
; must not be null
coordinates
- the configuration coordinates to which this
ConfigurationValue
applies; must be a subset of the
configuration coordinates that resulted in this ConfigurationValue
being created; may be null
name
- the name of the configuration property for which this
is a value; must not be null
value
- the value; may be null
authoritative
- whether this ConfigurationValue
is
to be considered authoritativeNullPointerException
- if either source
or name
is null
public final Object getSource()
ConfigurationValue
.
This method never returns null
.
ConfigurationValue
;
never null
public final Map<String,String> getCoordinates()
ConfigurationValue
in configuration space.
This method may return null
.
ConfigurationValue
in configuration space, or null
public final String getName()
ConfigurationValue
is a value.
This method never returns null
.
ConfigurationValue
is a value; never null
public final String getValue()
ConfigurationValue
represents.
This method may return null
.
ConfigurationValue
represents, or null
public final boolean isAuthoritative()
true
if this ConfigurationValue
is to be
regarded as authoritative.true
if this ConfigurationValue
is to be
regarded as authoritative; false
otherwisepublic final int specificity()
ConfigurationValue
.
The specificity of a ConfigurationValue
is equal to
the size of its configuration coordinates
Map
.
ConfigurationValue
;
always zero or a positive integerpublic int hashCode()
ConfigurationValue
.hashCode
in class Object
ConfigurationValue
public boolean equals(Object other)
true
if the supplied Object
is equal to
this ConfigurationValue
.
An Object
is equal to a ConfigurationValue
if:
ConfigurationValue
coordinates
are equal to those of the ConfigurationValue
to which it is being comparedConfigurationValue
to which it is being comparedequals
in class Object
other
- the Object
to test; may be null
true
if the supplied Object
is equal to
this ConfigurationValue
; false
otherwisepublic String toString()
null
String
representation of this
ConfigurationValue
.
This method never returns null
.
Overrides of this method must not return null
.
toString
in class Object
null
String
representation of this
ConfigurationValue
Copyright © 2017–2018, microBean. All rights reserved.