public abstract class HistorySupport extends Object implements History
| Modifier and Type | Field and Description |
|---|---|
protected String |
initSchema_ |
protected Map<ZLocator,ZValue> |
inputs_ |
protected PropertyChangeSupport |
propertyChangeSupport
Support class for property change listeners on
currentSolution
and currentSolutionSet. |
protected String |
stateSchema_ |
| Constructor and Description |
|---|
HistorySupport()
Basic constructor.
|
HistorySupport(String stateSchema,
String initSchema)
Sets the properties keeping track of state and initialisation schema names,
and activates the
initialisation schema.
|
| Modifier and Type | Method and Description |
|---|---|
void |
activateSchema(String schemaName)
Performs an operation from the current solution.
|
void |
addInput(ZLocator variable,
BeanContext beanContext,
String beanName,
String property)
Convenience function for adding values into the inputs.
|
void |
addInput(ZLocator variable,
Object bean,
String property)
Convenience function for adding values into the inputs.
|
void |
addInput(ZLocator variable,
ZValue value)
Convenience function for adding values into the inputs.
|
void |
addPropertyChangeListener(PropertyChangeListener listener)
Function for adding property change listeners.
|
void |
addPropertyChangeListener(String propertyName,
PropertyChangeListener listener)
Function for adding property change listeners.
|
ZBinding |
getCurrentSolution()
Returns the current solution in the current solution set.
|
abstract SolutionSet |
getCurrentSolutionSet()
Returns the current solution set.
|
String |
getInitSchema()
Getter for the name of the initialisation schema.
|
Map<ZLocator,ZValue> |
getInputs()
Getter function for the map from locators, and the object.property to bind
them to.
|
PropertyChangeListener[] |
getPropertyChangeListeners()
Getter function for property change listeners.
|
PropertyChangeListener[] |
getPropertyChangeListeners(String propertyName)
Getter function for property change listeners.
|
String |
getStateSchema()
Getter for the name of the state schema.
|
boolean |
hasCurrentSolution()
Returns true if there is a current solution.
|
boolean |
hasListeners(String propertyName)
Check if a property has property change listeners.
|
boolean |
hasNextSolution() |
boolean |
hasPreviousSolution() |
void |
nextSolution()
Moves to the next solution in the current set.
|
void |
previousSolution()
Moves to the previous solution in the current set.
|
void |
removePropertyChangeListener(PropertyChangeListener listener)
Function for removing property change listeners.
|
void |
removePropertyChangeListener(String propertyName,
PropertyChangeListener listener)
Function for removing property change listeners.
|
void |
setInitSchema(String schemaName)
Setter for the name of the initialisation schema.
|
void |
setStateSchema(String schemaName)
Setter for the name of the state schema.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetPositionLabelprotected String initSchema_
protected String stateSchema_
protected PropertyChangeSupport propertyChangeSupport
currentSolution
and currentSolutionSet.public HistorySupport()
History.activateSchema(String)public HistorySupport(String stateSchema, String initSchema)
stateSchema - The name of the state schema.initSchema - The name of the initialisation schema.History.activateSchema(String)public String getInitSchema()
HistorygetInitSchema in interface Historypublic void setInitSchema(String schemaName)
HistorysetInitSchema in interface Historypublic String getStateSchema()
HistorygetStateSchema in interface Historypublic void setStateSchema(String schemaName)
HistorysetStateSchema in interface Historypublic abstract SolutionSet getCurrentSolutionSet()
HistorygetCurrentSolutionSet in interface Historypublic ZBinding getCurrentSolution()
HistorygetCurrentSolution in interface Historypublic boolean hasCurrentSolution()
HistoryhasCurrentSolution in interface Historypublic Map<ZLocator,ZValue> getInputs()
public void addInput(ZLocator variable, ZValue value)
public void addInput(ZLocator variable, Object bean, String property)
public void addInput(ZLocator variable, BeanContext beanContext, String beanName, String property)
public void activateSchema(String schemaName)
HistoryactivateSchema in interface Historypublic boolean hasNextSolution()
public void nextSolution()
public boolean hasPreviousSolution()
public void previousSolution()
public void addPropertyChangeListener(PropertyChangeListener listener)
HistoryaddPropertyChangeListener in interface HistoryPropertyChangeSupportpublic void removePropertyChangeListener(PropertyChangeListener listener)
HistoryremovePropertyChangeListener in interface HistoryPropertyChangeSupportpublic PropertyChangeListener[] getPropertyChangeListeners()
HistorygetPropertyChangeListeners in interface HistoryPropertyChangeSupportpublic void addPropertyChangeListener(String propertyName, PropertyChangeListener listener)
HistoryaddPropertyChangeListener in interface HistoryPropertyChangeSupportpublic void removePropertyChangeListener(String propertyName, PropertyChangeListener listener)
HistoryremovePropertyChangeListener in interface HistoryPropertyChangeSupportpublic PropertyChangeListener[] getPropertyChangeListeners(String propertyName)
HistorygetPropertyChangeListeners in interface HistoryPropertyChangeSupportpublic boolean hasListeners(String propertyName)
HistoryhasListeners in interface HistoryPropertyChangeSupportCopyright © 2003–2016 Community Z Tools Project. All rights reserved.