projects
/
platform
/
upstream
/
libgee.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3e1c16f
)
Add Gee.TreeSet.foreach implementation
author
Maciej Piechotka
<uzytkownik2@gmail.com>
Mon, 15 Jul 2013 23:01:20 +0000
(
01:01
+0200)
committer
Maciej Piechotka
<uzytkownik2@gmail.com>
Mon, 15 Jul 2013 23:01:20 +0000
(
01:01
+0200)
gee/treeset.vala
patch
|
blob
|
history
diff --git
a/gee/treeset.vala
b/gee/treeset.vala
index
af8105f
..
c4212df
100644
(file)
--- a/
gee/treeset.vala
+++ b/
gee/treeset.vala
@@
-345,6
+345,18
@@
public class Gee.TreeSet<G> : AbstractBidirSortedSet<G> {
/**
* {@inheritDoc}
*/
+ public override bool foreach (ForallFunc<G> f) {
+ for (unowned Node<G> node = _first; node != null; node = node.next) {
+ if (!f (node.key)) {
+ return false;
+ }
+ }
+ return true;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
public override Gee.Iterator<G> iterator () {
return new Iterator<G> (this);
}