Layers: add contains methods (#1032)

This commit is contained in:
Emux 2023-04-10 11:32:14 +03:00 committed by GitHub
parent 5613a96cc2
commit 25d28ad9e2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -209,6 +209,20 @@ public final class Layers extends AbstractList<Layer> {
mGroupIndex.put(group, mLayerList.size());
}
/**
* @see List#contains(Object)
*/
public synchronized boolean contains(Layer layer) {
return mLayerList.contains(layer);
}
/**
* @see List#contains(Object)
*/
public synchronized boolean containsGroup(int group) {
return mGroupList.contains(group);
}
/**
* Should only be used by MapRenderer.
*