Package org.insa.graphs.gui
Class SolutionPanel.SolutionBundle
- java.lang.Object
-
- org.insa.graphs.gui.SolutionPanel.SolutionBundle
-
- Enclosing class:
- SolutionPanel
private class SolutionPanel.SolutionBundle extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.List<PathOverlay>overlaysprivate AbstractSolutionsolution
-
Constructor Summary
Constructors Constructor Description SolutionBundle(AbstractSolution solution, boolean createOverlays)Create a new bundle with the given solution and create a new overlay corresponding to the solution (if the solution is feasible).
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private java.util.List<PathOverlay>createOverlaysFromSolution()AbstractInputDatagetData()java.util.List<PathOverlay>getOverlays()AbstractSolutiongetSolution()booleanhasOverlays()java.lang.StringtoString()voidupdateOverlays()Re-draw the current overlay (if any) on the new drawing.
-
-
-
Field Detail
-
solution
private final AbstractSolution solution
-
overlays
private java.util.List<PathOverlay> overlays
-
-
Constructor Detail
-
SolutionBundle
public SolutionBundle(AbstractSolution solution, boolean createOverlays)
Create a new bundle with the given solution and create a new overlay corresponding to the solution (if the solution is feasible).- Parameters:
solution- Solution for this bundle, must not be null.
-
-
Method Detail
-
getSolution
public AbstractSolution getSolution()
- Returns:
- Solution associated with this bundle.
-
getData
public AbstractInputData getData()
- Returns:
- Data assocaited with this bundle.
-
getOverlays
public java.util.List<PathOverlay> getOverlays()
- Returns:
- Overlays associated with this bundle, or null.
-
hasOverlays
public boolean hasOverlays()
- Returns:
- true if this bundle has overlays.
-
updateOverlays
public void updateOverlays()
Re-draw the current overlay (if any) on the new drawing.
-
createOverlaysFromSolution
private java.util.List<PathOverlay> createOverlaysFromSolution()
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-