-
- Type Parameters:
T- Type of value represented by provider
- All Known Subinterfaces:
- DirectoryVar, PropertyState<T>, RegularFileVar
@Incubating public interface Provider<T>
- Since:
- 4.0
-
-
Method Summary
Methods Modifier and Type Method and Description Tget()If a value is present in this provider, returns the value, otherwise throws
java.lang.IllegalStateException.TgetOrNull()Returns the value if present in this provider.
booleanisPresent()Returns
trueif there is a value present, otherwisefalse.
-
-
-
Method Detail
-
get
T get()
If a value is present in this provider, returns the value, otherwise throws
java.lang.IllegalStateException.- Returns:
- Value
- Throws:
IllegalStateException- if there is no value present
-
getOrNull
@Internal @Nullable T getOrNull()
Returns the value if present in this provider. Returns null if value is not available.
- Returns:
- Value
-
isPresent
@Internal boolean isPresent()
Returns
trueif there is a value present, otherwisefalse.- Returns:
trueif there is a value present, otherwisefalse
-
-