T
- Type of value represented by provider@Incubating public interface Provider<T>
get()
or getOrNull()
.Modifier and Type | Method and Description |
---|---|
T |
get()
If a value is present in this provider, returns the value, otherwise throws
java.lang.IllegalStateException . |
T |
getOrNull()
Returns the value if present in this provider.
|
boolean |
isPresent()
Returns
true if there is a value present, otherwise false . |
T get()
java.lang.IllegalStateException
.IllegalStateException
- if there is no value present@Internal T getOrNull()
@Internal boolean isPresent()
true
if there is a value present, otherwise false
.true
if there is a value present, otherwise false