public class IlrBRLDefaultVariableProvider extends java.lang.Object implements IlrBRLVariableProvider, BRLVariableManager
IlrBRLVariableProvider.VisitorBRLVariableManager.ChangeEvent, BRLVariableManager.VariablesListenerVARIABLE_ADDED, VARIABLE_CLEARED, VARIABLE_REMOVED| Constructor and Description |
|---|
IlrBRLDefaultVariableProvider(java.util.Collection<IlrBRLVariable> variables)
This constructor creates a default Variable Provider managing a set of variables given as argument.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addChangeListener(BRLVariableManager.VariablesListener listener)
This method registers the given listener to this manager.
|
void |
addVariable(IlrBRLVariable variable)
This method adds a variable to be managed by this Variable Provider.
|
IlrBRLVariable |
getVariable(IlrVocabulary vocabulary,
java.lang.String name)
Returns a variable with that name, or
null if there is no variable corresponding to that name. |
java.util.Collection<IlrBRLVariable> |
getVariables()
This method returns the list of variables held by this variable provider
|
void |
removeChangeListener(BRLVariableManager.VariablesListener listener)
This method un-registers the given listener from this manager.
|
void |
removeVariable(java.lang.String name)
This method removes a variable from this Variable Provider.
|
void |
removeVariables()
This method removes all variables managed by this Variable Provider.
|
boolean |
visit(IlrVocabulary vocabulary,
IlrBRLVariableProvider.Visitor visitor)
Visits the variable provider by iterating on all variables declared by this provider.
|
public IlrBRLDefaultVariableProvider(java.util.Collection<IlrBRLVariable> variables)
variables - a collection of variablespublic IlrBRLVariable getVariable(IlrVocabulary vocabulary, java.lang.String name)
IlrBRLVariableProvidernull if there is no variable corresponding to that name.getVariable in interface IlrBRLVariableProvidervocabulary - The vocabulary in which this variable is looked up.name - The name of the variable to look for.public boolean visit(IlrVocabulary vocabulary, IlrBRLVariableProvider.Visitor visitor)
IlrBRLVariableProvidervisit in interface IlrBRLVariableProvidervocabulary - The vocabulary in which variables are looked up.visitor - A variable visitor called for all variables declared in this variable provider.public void addVariable(IlrBRLVariable variable)
variable - the variable to be addedpublic void removeVariable(java.lang.String name)
name - the name of the variable to be removedpublic void removeVariables()
public void addChangeListener(BRLVariableManager.VariablesListener listener)
BRLVariableManageraddChangeListener in interface BRLVariableManagerlistener - the listener to be notified by this manager .public void removeChangeListener(BRLVariableManager.VariablesListener listener)
BRLVariableManagerremoveChangeListener in interface BRLVariableManagerlistener - the listener to be removed from the list of listeners handled by this manager.public java.util.Collection<IlrBRLVariable> getVariables()
© Copyright IBM Corp. 1987, 2017