T
- The value type of the option when configuring a value programmaticallypublic final class Option<T> extends Object
ConnectionFactoryOptions
,
TransactionDefinition
Modifier and Type | Method and Description |
---|---|
T |
cast(Object obj)
Casts an object to the class or interface represented by this option object.
|
boolean |
equals(Object o) |
int |
hashCode() |
String |
name()
Returns the name of the option.
|
static <T> Option<T> |
sensitiveValueOf(String name)
Returns a constant singleton instance of the sensitive option.
|
String |
toString() |
static <T> Option<T> |
valueOf(String name)
Returns a constant singleton instance of the option.
|
public static <T> Option<T> sensitiveValueOf(String name)
T
- the value type of the optionname
- the name of the option to returnIllegalArgumentException
- if name
is null
or emptypublic static <T> Option<T> valueOf(String name)
T
- the value type of the optionname
- the name of the option to returnIllegalArgumentException
- if name
is null
or empty@Nullable public T cast(@Nullable Object obj)
obj
- the object to be castnull
.public String name()
Copyright © 2022. All rights reserved.