Last change
on this file since 18792 was 11099, checked in by Don-vip, 8 years ago |
sonar - squid:S1609 - @FunctionalInterface annotation should be used to flag Single Abstract Method interfaces
|
-
Property svn:eol-style
set to
native
|
File size:
1.3 KB
|
Line | |
---|
1 | // License: GPL. For details, see LICENSE file.
|
---|
2 | package org.openstreetmap.josm.data;
|
---|
3 |
|
---|
4 | import java.awt.geom.Area;
|
---|
5 | import java.util.Collection;
|
---|
6 | import java.util.List;
|
---|
7 |
|
---|
8 | /**
|
---|
9 | * Generic data, holding data downloaded from various data sources.
|
---|
10 | * @since 7575
|
---|
11 | */
|
---|
12 | @FunctionalInterface
|
---|
13 | public interface Data {
|
---|
14 |
|
---|
15 | /**
|
---|
16 | * Returns the collection of data sources.
|
---|
17 | * @return the collection of data sources.
|
---|
18 | */
|
---|
19 | Collection<DataSource> getDataSources();
|
---|
20 |
|
---|
21 | /**
|
---|
22 | * Returns the total area of downloaded data (the "yellow rectangles").
|
---|
23 | * @return Area object encompassing downloaded data.
|
---|
24 | */
|
---|
25 | default Area getDataSourceArea() {
|
---|
26 | return DataSource.getDataSourceArea(getDataSources());
|
---|
27 | }
|
---|
28 |
|
---|
29 | /**
|
---|
30 | * <p>Replies the list of data source bounds.</p>
|
---|
31 | *
|
---|
32 | * <p>Dataset maintains a list of data sources which have been merged into the
|
---|
33 | * data set. Each of these sources can optionally declare a bounding box of the
|
---|
34 | * data it supplied to the dataset.</p>
|
---|
35 | *
|
---|
36 | * <p>This method replies the list of defined (non {@code null}) bounding boxes.</p>
|
---|
37 | *
|
---|
38 | * @return the list of data source bounds. An empty list, if no non-null data source
|
---|
39 | * bounds are defined.
|
---|
40 | */
|
---|
41 | default List<Bounds> getDataSourceBounds() {
|
---|
42 | return DataSource.getDataSourceBounds(getDataSources());
|
---|
43 | }
|
---|
44 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.