Changeset 13726 in osm for applications/editors
- Timestamp:
- 2009-02-14T14:38:04+01:00 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/surveyor/src/at/dallermassl/josm/plugin/surveyor/util/LayerUtil.java
r13497 r13726 20 20 * @return the layer or <code>null</code>. 21 21 */ 22 @SuppressWarnings("unchecked") 22 23 public static <LayerType extends Layer> LayerType findGpsLayer(String layerName, Class<LayerType> layerType) { 23 Layer Typeresult = null;24 Layer result = null; 24 25 if(Main.map != null && Main.map.mapView != null) { 25 26 for(Layer layer : Main.map.mapView.getAllLayers()) { 26 27 if(layerName.equals(layer.name) && layerType.isAssignableFrom(layer.getClass())) { 27 result = (LayerType)layer;28 result = layer; 28 29 break; 29 30 } 30 31 } 31 32 } 32 return result;33 return (LayerType) result; 33 34 } 34 35 35 }
Note:
See TracChangeset
for help on using the changeset viewer.