public class VariableResolverMap<V> extends Object implements VariableResolver
| Constructor and Description |
|---|
VariableResolverMap()
Creates a new variable resolver.
|
VariableResolverMap(Map<String,? extends V> map)
Creates a new variable resolver from the given map.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
exists(String value)
Indicates whether the given value exists.
|
V |
resolve(String value)
Resolves the variable and returns the associated object.
|
public VariableResolverMap()
public boolean exists(String value)
true only if the value can be resolved, that is
resolve(value) != null.exists in interface VariableResolvervalue - The value to check for existence.true if the specified value can be resolved;
false otherwise.public V resolve(String value)
null if the value a value exists, but should return
null, if the value cannot be resolved.
If the implementation does not bind values to objects, this method should return the value if
it can be resolved otherwise, it should return null.resolve in interface VariableResolvervalue - The value to resolve.Copyright © 2021. All rights reserved.