public class StageConfig.Builder<T> extends Object implements StageConfig.Resolver<T>
| Modifier and Type | Method and Description |
|---|---|
<N> StageConfig.Resolver<N> |
as(Class<N> clazz)
Retrieve a resolver capable of coercing to another simple type.
|
<N> StageConfig.Resolver<N> |
as(Class<N> clazz,
StageConfig.Converter<T> converter)
Retrieve a resolver capable of coering to another type.
|
String |
getKey()
Retrieve the key of the configuration item.
|
T |
getValue()
Retrieve the coerced value.
|
boolean |
hasValue()
Determine if there is any value set.
|
StageConfig.Resolver<T> |
withDefault(T value)
Provide a default value to be provided in the case no value is currently bound.
|
public Builder(String key)
public <N> StageConfig.Resolver<N> as(Class<N> clazz)
StageConfig.Resolveras in interface StageConfig.Resolver<T>N - The value type to coerce to.clazz - The class to coerce to.public <N> StageConfig.Resolver<N> as(Class<N> clazz, StageConfig.Converter<T> converter)
StageConfig.Resolveras in interface StageConfig.Resolver<T>N - The value type to coerce to.clazz - The class to coerce to.converter - The converter to support the coercion.public String getKey()
StageConfig.ResolvergetKey in interface StageConfig.Resolver<T>public T getValue()
StageConfig.ResolvergetValue in interface StageConfig.Resolver<T>public boolean hasValue()
StageConfig.ResolverhasValue in interface StageConfig.Resolver<T>true if a value is set, otherwise falsepublic StageConfig.Resolver<T> withDefault(T value)
StageConfig.ResolverwithDefault in interface StageConfig.Resolver<T>value - The default fall-back value.Copyright © 2016 JBoss by Red Hat. All rights reserved.