提交 55965667 编写于 作者: K Kohsuke Kawaguchi

added a convenience method

上级 60d1c02f
......@@ -157,6 +157,23 @@ public class ExtensionList<T> extends AbstractList<T> {
return ensureLoaded().size();
}
/**
* Gets the read-only view of this {@link ExtensionList} where components are reversed.
*/
public List<T> reverseView() {
return new AbstractList<T>() {
@Override
public T get(int index) {
return ExtensionList.this.get(size()-index-1);
}
@Override
public int size() {
return ExtensionList.this.size();
}
};
}
@Override
public synchronized boolean remove(Object o) {
removeComponent(legacyInstances,o);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册