public final class SanitizableData extends Object
SanitizingFunction
.Modifier and Type | Field and Description |
---|---|
static String |
SANITIZED_VALUE
Represents a sanitized value.
|
Constructor and Description |
---|
SanitizableData(PropertySource<?> propertySource,
String key,
Object value)
Create a new
SanitizableData instance. |
Modifier and Type | Method and Description |
---|---|
String |
getKey()
Return the key of the data.
|
PropertySource<?> |
getPropertySource()
Return the property source that provided the data or
null If the data was
not from a PropertySource . |
Object |
getValue()
Return the value of the data.
|
SanitizableData |
withValue(Object value)
Return a new
SanitizableData instance with a different value. |
public static final String SANITIZED_VALUE
public SanitizableData(PropertySource<?> propertySource, String key, Object value)
SanitizableData
instance.propertySource
- the property source that provided the data or null
.key
- the data keyvalue
- the data valuepublic PropertySource<?> getPropertySource()
null
If the data was
not from a PropertySource
.public String getKey()
public Object getValue()
public SanitizableData withValue(Object value)
SanitizableData
instance with a different value.value
- the new value (often SANITIZED_VALUE