ItemizedLayer: API enhancements for adding Collection of any MarkerInterface implementation (#211)

This commit is contained in:
pedrop 2016-10-26 23:17:07 +03:00 committed by Emux
parent 422d81d665
commit 1d7afaf8de

View File

@ -4,6 +4,7 @@
* Copyright 2013 Hannes Janetzek
* Copyright 2016 devemux86
* Copyright 2016 Stephan Leuschner
* Copyright 2016 Pedinel
*
* This file is part of the OpenScienceMap project (http://www.opensciencemap.org).
*
@ -31,6 +32,7 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
public class ItemizedLayer<Item extends MarkerInterface> extends MarkerLayer<Item>
@ -97,7 +99,7 @@ public class ItemizedLayer<Item extends MarkerInterface> extends MarkerLayer<Ite
mItemList.add(location, item);
}
public boolean addItems(List<Item> items) {
public boolean addItems(Collection<Item> items) {
final boolean result = mItemList.addAll(items);
populate();
return result;