public class VariableStore<T extends CoreVariableInstance> extends Object
Modifier and Type | Class and Description |
---|---|
static interface |
VariableStore.VariablesProvider<T extends CoreVariableInstance> |
static interface |
VariableStore.VariableStoreObserver<T extends CoreVariableInstance> |
Modifier and Type | Field and Description |
---|---|
protected List<VariableStore.VariableStoreObserver<T>> |
observers |
protected Map<String,T> |
removedVariables |
protected Map<String,T> |
variables |
protected VariableStore.VariablesProvider<T> |
variablesProvider |
Constructor and Description |
---|
VariableStore() |
VariableStore(VariableStore.VariablesProvider<T> provider,
VariableStore.VariableStoreObserver<T>... observers) |
Modifier and Type | Method and Description |
---|---|
void |
addObserver(VariableStore.VariableStoreObserver<T> observer) |
void |
addVariable(T value) |
boolean |
containsKey(String key) |
boolean |
containsValue(T value) |
void |
forceInitialization() |
Set<String> |
getKeys() |
T |
getRemovedVariable(String name) |
T |
getVariable(String name) |
List<T> |
getVariables() |
List<T> |
getVariables(Collection<String> variableNames) |
protected Map<String,T> |
getVariablesMap() |
protected Map<String,T> |
getVariablesMap(Collection<String> variableNames) |
boolean |
isEmpty() |
boolean |
isInitialized() |
boolean |
isRemoved(String variableName) |
void |
removeObserver(VariableStore.VariableStoreObserver<T> observer) |
T |
removeVariable(String variableName) |
void |
removeVariables() |
void |
setVariablesProvider(VariableStore.VariablesProvider<T> variablesProvider)
The variables provider can be exchanged as long as the variables are not yet initialized
|
void |
updateVariable(T value) |
protected VariableStore.VariablesProvider<T extends CoreVariableInstance> variablesProvider
protected Map<String,T extends CoreVariableInstance> variables
protected Map<String,T extends CoreVariableInstance> removedVariables
protected List<VariableStore.VariableStoreObserver<T extends CoreVariableInstance>> observers
public VariableStore()
public VariableStore(VariableStore.VariablesProvider<T> provider, VariableStore.VariableStoreObserver<T>... observers)
public void setVariablesProvider(VariableStore.VariablesProvider<T> variablesProvider)
protected Map<String,T> getVariablesMap(Collection<String> variableNames)
public List<T> getVariables(Collection<String> variableNames)
public void addVariable(T value)
public void updateVariable(T value)
public boolean isEmpty()
public boolean containsValue(T value)
public boolean containsKey(String key)
public boolean isInitialized()
public void forceInitialization()
public void removeVariables()
public void addObserver(VariableStore.VariableStoreObserver<T> observer)
public void removeObserver(VariableStore.VariableStoreObserver<T> observer)
public boolean isRemoved(String variableName)
Copyright © 2019. All rights reserved.