public class LayerMap extends Object
Modifier and Type | Field and Description |
---|---|
private HashMap<Pair<PlotItem,VisualizationTask>,Pair<Element,Visualization>> |
map
The actual map
|
Constructor and Description |
---|
LayerMap() |
Modifier and Type | Method and Description |
---|---|
void |
clear()
Clear a map
|
Pair<Element,Visualization> |
get(PlotItem it,
VisualizationTask task)
Get a pair from the map
|
Element |
getContainer(PlotItem item,
VisualizationTask task)
Get the container element referenced by a item/key combination.
|
Visualization |
getVisualization(PlotItem item,
VisualizationTask task)
Get the visualization referenced by a item/key combination.
|
private Pair<PlotItem,VisualizationTask> |
key(PlotItem item,
VisualizationTask task)
Helper function for building a key object
|
void |
put(PlotItem it,
VisualizationTask task,
Element elem,
Visualization vis)
Put a new combination into the map.
|
void |
put(PlotItem it,
VisualizationTask task,
Pair<Element,Visualization> pair)
Put a new item into the visualizations
|
Pair<Element,Visualization> |
remove(PlotItem it,
VisualizationTask task)
Remove a combination.
|
private Pair<Element,Visualization> |
value(Element elem,
Visualization vis)
Helper function to build a value pair
|
Iterable<Pair<Element,Visualization>> |
values()
Iterate over values
|
private HashMap<Pair<PlotItem,VisualizationTask>,Pair<Element,Visualization>> map
private Pair<PlotItem,VisualizationTask> key(PlotItem item, VisualizationTask task)
item
- Plot itemtask
- Visualization Taskprivate Pair<Element,Visualization> value(Element elem, Visualization vis)
elem
- Container elementvis
- Visualizationpublic Visualization getVisualization(PlotItem item, VisualizationTask task)
item
- Plot ttemtask
- Visualization taskpublic Element getContainer(PlotItem item, VisualizationTask task)
item
- Plot itemtask
- Visualization taskpublic Iterable<Pair<Element,Visualization>> values()
public void clear()
public void put(PlotItem it, VisualizationTask task, Element elem, Visualization vis)
it
- Plot itemtask
- Visualization Taskelem
- Container elementvis
- Visualizationpublic Pair<Element,Visualization> remove(PlotItem it, VisualizationTask task)
it
- Plot itemtask
- Visualization taskpublic void put(PlotItem it, VisualizationTask task, Pair<Element,Visualization> pair)
it
- Plot itemtask
- Visualization taskpair
- Pair objectpublic Pair<Element,Visualization> get(PlotItem it, VisualizationTask task)
it
- Plot itemtask
- Visualization task