public class SolutionSet extends Object
| Modifier and Type | Field and Description |
|---|---|
protected PropertyChangeSupport |
propertyChangeSupport_ |
| Constructor and Description |
|---|
SolutionSet(String schemaName,
Set<? extends ZValue> solutions)
Creates a
SolutionSet from a Set containing all
of the solutions. |
SolutionSet(String schemaName,
ZBinding solution)
Creates a
SolutionSet containing just one solution. |
| Modifier and Type | Method and Description |
|---|---|
void |
addPropertyChangeListener(PropertyChangeListener listener)
Registers a
PropertyChangeListener. |
void |
addPropertyChangeListener(String propertyName,
PropertyChangeListener listener)
Registers a
PropertyChangeListener for a specific property. |
ZBinding |
getCurrentSolution()
Getter function for the currently selected solution in the SolutionSet.
|
String |
getPositionLabel() |
PropertyChangeListener[] |
getPropertyChangeListeners()
Returns all of the
PropertyChangeListeners. |
PropertyChangeListener[] |
getPropertyChangeListeners(String propertyName)
Returns all of the
PropertyChangeListeners for a specific
property. |
String |
getSchemaName()
Getter function for the name of the schema that created this solution set.
|
boolean |
hasCurrentSolution() |
boolean |
hasNextSolution() |
boolean |
hasPreviousSolution() |
void |
nextSolution()
Steps the current solution to the next in this
SolutionSet. |
void |
previousSolution()
Steps the current solution to the previous in this
SolutionSet. |
void |
removePropertyChangeListener(PropertyChangeListener listener)
Unregisters a
PropertyChangeListener. |
void |
removePropertyChangeListener(String propertyName,
PropertyChangeListener listener)
Unregisters a
PropertyChangeListener for a specific property. |
protected final PropertyChangeSupport propertyChangeSupport_
public SolutionSet(String schemaName, Set<? extends ZValue> solutions)
SolutionSet from a Set containing all
of the solutions.schemaName - The name of the schema that created this solution set.solutions - The set of solutions to go into this
SolutionSet.public String getSchemaName()
public ZBinding getCurrentSolution()
null if there is no current
solution).public boolean hasCurrentSolution()
true if there is a current solution (i.e. if
getCurrentSolution() will not return
null).public boolean hasNextSolution()
true if there is a next solution in the
SolutionSet (similar to hasNext in
Iterators).public void nextSolution()
SolutionSet.
Does nothing if it is already at the first solution.public boolean hasPreviousSolution()
true if there is a previous solution in the
SolutionSet (similar to hasPrevious in
Iterators).public void previousSolution()
SolutionSet.
Does nothing if it is already at the last solution.public void addPropertyChangeListener(PropertyChangeListener listener)
PropertyChangeListener.
The only property that will trigger a PropertyChangeEvent is
currentSolution.public void removePropertyChangeListener(PropertyChangeListener listener)
PropertyChangeListener.
The only property that will trigger a PropertyChangeEvent is
currentSolution.public PropertyChangeListener[] getPropertyChangeListeners()
PropertyChangeListeners.
The only property that will trigger a PropertyChangeEvent is
currentSolution.public void addPropertyChangeListener(String propertyName, PropertyChangeListener listener)
PropertyChangeListener for a specific property.
The only property that will trigger a PropertyChangeEvent is
currentSolution.public void removePropertyChangeListener(String propertyName, PropertyChangeListener listener)
PropertyChangeListener for a specific property.
The only property that will trigger a PropertyChangeEvent is
currentSolution.public PropertyChangeListener[] getPropertyChangeListeners(String propertyName)
PropertyChangeListeners for a specific
property.
The only property that will trigger a PropertyChangeEvent is
currentSolution.public String getPositionLabel()
true if there are no
PropertyChangeListeners registered.
public boolean hasListeners(String propertyName)
{
return propertyChangeSupport_.hasListeners(propertyName);
};
/**Copyright © 2003–2016 Community Z Tools Project. All rights reserved.