ItemizedLayer: API enhancements for adding Collection of any MarkerInterface implementation (#211)
This commit is contained in:
parent
422d81d665
commit
1d7afaf8de
@ -4,6 +4,7 @@
|
|||||||
* Copyright 2013 Hannes Janetzek
|
* Copyright 2013 Hannes Janetzek
|
||||||
* Copyright 2016 devemux86
|
* Copyright 2016 devemux86
|
||||||
* Copyright 2016 Stephan Leuschner
|
* Copyright 2016 Stephan Leuschner
|
||||||
|
* Copyright 2016 Pedinel
|
||||||
*
|
*
|
||||||
* This file is part of the OpenScienceMap project (http://www.opensciencemap.org).
|
* 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 org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
import java.util.Collection;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
public class ItemizedLayer<Item extends MarkerInterface> extends MarkerLayer<Item>
|
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);
|
mItemList.add(location, item);
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean addItems(List<Item> items) {
|
public boolean addItems(Collection<Item> items) {
|
||||||
final boolean result = mItemList.addAll(items);
|
final boolean result = mItemList.addAll(items);
|
||||||
populate();
|
populate();
|
||||||
return result;
|
return result;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user