提交 743fe222 编写于 作者: K kohsuke

added ascending ordering.


git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@5448 71c3de6d-444a-0410-be80-ed276b4c234a
上级 acb7e83a
......@@ -197,6 +197,22 @@ public class Fingerprint implements ModelObject {
this.ranges = data;
}
/**
* List all numbers in this range set.
*/
public Iterable<Integer> listNumbers() {
final List<Range> ranges = getRanges();
return new Iterable<Integer>() {
public Iterator<Integer> iterator() {
return new Iterators.FlattenIterator<Integer,Range>(ranges) {
protected Iterator<Integer> expand(Range range) {
return Iterators.sequence(range.start,range.end).iterator();
}
};
}
};
}
/**
* List all numbers in this range set in the descending order.
*/
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册