public class Property<T> extends Object
RequestContext
property with a given value (or exception, if the value could not be determined).Modifier | Constructor and Description |
---|---|
protected |
Property(T value,
Exception exception,
boolean isConfidential)
Creates a property.
|
Modifier and Type | Method and Description |
---|---|
protected boolean |
canEqual(Object other) |
static <T> Property<T> |
empty()
Creates an empty property.
|
boolean |
equals(Object o) |
Exception |
getException() |
T |
getValue() |
int |
hashCode() |
boolean |
isConfidential() |
static <T> Property<T> |
ofConfidentialException(Exception confidentialException)
Creates a confidential property from the given exception.
|
static <T> Property<T> |
ofConfidentialValue(T confidentialValue)
Creates a confidential property from the given value.
|
static <T> Property<T> |
ofException(Exception exception)
Creates a non-confidential property from the given exception.
|
static <T> Property<T> |
ofValue(T value)
Creates a non-confidential property from the given value.
|
String |
toString() |
protected Property(@Nullable T value, @Nullable Exception exception, boolean isConfidential)
value
- The value of the property, if present.exception
- The exception that has occurred while retrieving the value, if present.isConfidential
- Whether the property must be handled confidentially, e.g., it should not be written to log files and
toString()
should not reveal the value or exception.public static <T> Property<T> empty()
public static <T> Property<T> ofValue(@Nullable T value)
public static <T> Property<T> ofException(@Nullable Exception exception)
public static <T> Property<T> ofConfidentialValue(@Nullable T confidentialValue)
public static <T> Property<T> ofConfidentialException(@Nullable Exception confidentialException)
protected boolean canEqual(Object other)
public boolean isConfidential()
Copyright © 2018 SAP SE. All rights reserved.