public final class ZoomLevels extends java.lang.Object implements ConfigurationObject
Encapsulates a sorted set of scale denominators representing the allowed scales.
The scales are sorted from largest to smallest and the index starts at 0, where 0 is the largest scale (most zoomed out).
map: !map
zoomLevels: !zoomLevels
scales: [5000, 10000, 25000, 50000, 100000, 500000]
[[examples=datasource_many_dynamictables_legend]]| Constructor and Description |
|---|
ZoomLevels()
default constructor for constructing by spring.
|
ZoomLevels(double... scales)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object o) |
double |
get(int index)
Get the zoom level at the given index.
|
double[] |
getScales()
Return a copy of the zoom level scale denominators.
|
int |
hashCode() |
void |
setScales(double[] scales)
Set the scales (sorts from largest to smallest).
|
int |
size()
The number of zoom levels.
|
java.lang.String |
toString() |
void |
validate(java.util.List<java.lang.Throwable> validationErrors,
Configuration configuration)
validate that the configuration was correct.
|
public ZoomLevels(double... scales)
scales - do not need to be sorted or unique.public ZoomLevels()
public void setScales(double[] scales)
scales - The scales (may be unsorted).public int size()
public double get(int index)
index - the index of the zoom level to access.public java.lang.String toString()
toString in class java.lang.Objectpublic boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic void validate(java.util.List<java.lang.Throwable> validationErrors,
Configuration configuration)
ConfigurationObjectvalidate in interface ConfigurationObjectvalidationErrors - a list to add any detected errors to.configuration - the containing configurationpublic double[] getScales()