public class KeysRetriever<U> extends Object implements RecodedParameterVisitor, CategorizedParameterVisitor
RecodedLegend or CategorizedLegend.
Note that this class has a parameter that must be set according to where it will be used. That means
if you intend to use it on a RecodedLegend, the parameter must be String, and it must be Double for a
CategorizedLegend. If you don't follow this rule, you'll face ClassCastExceptions.| Constructor and Description |
|---|
KeysRetriever()
Default constructor.
|
KeysRetriever(Comparator<U> comp)
Builds a new KeysRetriever instance whose inner sorted set is sorted using comp.
|
| Modifier and Type | Method and Description |
|---|---|
TreeSet<U> |
getKeys()
Gets the gathered keys.
|
void |
visit(CategorizedLegend legend)
Visit the given
CategorizedLegend. |
void |
visit(org.orbisgis.legend.structure.recode.RecodedLegend legend)
Visit the given
RecodedLegend. |
public KeysRetriever()
public KeysRetriever(Comparator<U> comp)
comp - The comparator we want to use.public void visit(org.orbisgis.legend.structure.recode.RecodedLegend legend)
RecodedParameterVisitorRecodedLegend. It's the intelligent part of the visitor implementation.visit in interface RecodedParameterVisitorpublic void visit(CategorizedLegend legend)
CategorizedParameterVisitorCategorizedLegend. It's the intelligent part of the visitor implementation.visit in interface CategorizedParameterVisitorCopyright © 2015 IRSTV CNRS-FR-2488. All Rights Reserved.