T
- the type of the attributepublic class AttributeValue<T> extends Object
AttributesSchema
of a consumer,
no value was provided.AttributesSchema
of a consumer,
implying that no value was provided. It is different from the missing case in the sense that the consumer
had no chance to provide a value here.strategies
.Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o) |
T |
get()
Returns the value of this attribute.
|
int |
hashCode() |
boolean |
isMissing()
Returns true if this attribute value is missing.
|
boolean |
isPresent()
Tells if this attribute value is present.
|
boolean |
isUnknown()
Returns true if this attribute value is unknown.
|
static <T> AttributeValue<T> |
missing()
Creates a missing attribute value, used to represent the fact that the attribute is known
but the consumer didn't want to express a value for it (it doesn't care).
|
static <T> AttributeValue<T> |
of(T value)
Creates a valued attribute from a non-null value.
|
static <T> AttributeValue<T> |
unknown()
Creates an unknown attribute value, used to represent the fact that the attribute is unknown
from the consumer side.
|
public static <T> AttributeValue<T> of(T value)
T
- the type of the attributevalue
- the value of the attributepublic static <T> AttributeValue<T> missing()
T
- the type of the attributepublic static <T> AttributeValue<T> unknown()
T
- the type of the attributepublic boolean isPresent()
null
.public T get()
public boolean isUnknown()
public boolean isMissing()