public class Property<T> extends Object
ThreadContext
property with a given value (or exception, if the value could not be determined).Modifier | Constructor and Description |
---|---|
protected |
Property(T value,
boolean isConfidential)
Creates a property.
|
Modifier and Type | Method and Description |
---|---|
protected boolean |
canEqual(Object other) |
boolean |
equals(Object o) |
T |
getValue() |
int |
hashCode() |
boolean |
isConfidential() |
static <T> Property<T> |
of(T value)
Creates a non-confidential property from the given value.
|
static <T> Property<T> |
ofConfidential(T confidentialValue)
Creates a confidential property from the given value.
|
static io.vavr.control.Try<Property<?>> |
ofConfidentialTry(io.vavr.control.Try<?> confidentialValueTry)
Creates a confidential property from a given
Try of a value. |
static io.vavr.control.Try<Property<?>> |
ofTry(io.vavr.control.Try<?> valueTry)
Creates a non-confidential property from a given
Try of a value. |
String |
toString() |
protected Property(@Nullable T value, boolean isConfidential)
value
- The value of the property. Use null
to indicate that this property has no value.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.@Nonnull public static <T> Property<T> of(@Nullable T value)
@Nonnull public static <T> Property<T> ofConfidential(@Nullable T confidentialValue)
@Nonnull public static io.vavr.control.Try<Property<?>> ofTry(@Nonnull io.vavr.control.Try<?> valueTry)
Try
of a value.@Nonnull public static io.vavr.control.Try<Property<?>> ofConfidentialTry(@Nonnull io.vavr.control.Try<?> confidentialValueTry)
Try
of a value.protected boolean canEqual(Object other)
public boolean isConfidential()
Copyright © 2020 SAP SE. All rights reserved.