public class SingleVariableContext extends Object implements VariableContext
VariableContext
allowing to resolve a single variable only.Modifier and Type | Field and Description |
---|---|
protected String |
name |
protected TypedValue |
typedValue |
Constructor and Description |
---|
SingleVariableContext(String name,
TypedValue typedValue) |
Modifier and Type | Method and Description |
---|---|
boolean |
containsVariable(String name)
Checks whether a variable with the given name is resolve through this context.
|
Set<String> |
keySet() |
TypedValue |
resolve(String variableName)
Resolve a value in this context.
|
static SingleVariableContext |
singleVariable(String name,
TypedValue value) |
protected final TypedValue typedValue
protected String name
public SingleVariableContext(String name, TypedValue typedValue)
public TypedValue resolve(String variableName)
VariableContext
resolve
in interface VariableContext
variableName
- the name of the variable to resolve.public boolean containsVariable(String name)
VariableContext
containsVariable
in interface VariableContext
name
- the name of the variable to checkpublic Set<String> keySet()
keySet
in interface VariableContext
public static SingleVariableContext singleVariable(String name, TypedValue value)
Copyright © 2022. All rights reserved.