[libgee] Move *_type to interfaces and remove the ones from classes
- From: Maciej Marcin Piechotka <mpiechotka src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libgee] Move *_type to interfaces and remove the ones from classes
- Date: Mon, 20 Aug 2012 07:20:27 +0000 (UTC)
commit 074a3f29eb357b1be1d7e338e2dcb8010f433914
Author: Maciej Piechotka <uzytkownik2 gmail com>
Date: Mon Aug 20 00:13:14 2012 -0700
Move *_type to interfaces and remove the ones from classes
gee/abstractcollection.vala | 7 -------
gee/abstractmap.vala | 7 -------
gee/abstractmultiset.vala | 4 ----
gee/arraylist.vala | 4 ----
gee/concurrentlist.vala | 4 ----
gee/hashmap.vala | 12 ------------
gee/hashset.vala | 4 ----
gee/linkedlist.vala | 4 ----
gee/multimap.vala | 4 ++--
gee/priorityqueue.vala | 4 ----
gee/treemap.vala | 24 ------------------------
gee/treeset.vala | 8 --------
gee/unfolditerator.vala | 4 ----
13 files changed, 2 insertions(+), 88 deletions(-)
---
diff --git a/gee/abstractcollection.vala b/gee/abstractcollection.vala
index 7e2595b..5476541 100644
--- a/gee/abstractcollection.vala
+++ b/gee/abstractcollection.vala
@@ -64,13 +64,6 @@ public abstract class Gee.AbstractCollection<G> : Object, Traversable<G>, Iterab
/**
* { inheritDoc}
*/
- public Type element_type {
- get { return typeof (G); }
- }
-
- /**
- * { inheritDoc}
- */
public abstract Iterator<G> iterator ();
public virtual void foreach (ForallFunc<G> f) {
diff --git a/gee/abstractmap.vala b/gee/abstractmap.vala
index e7a8bb2..707dd0d 100644
--- a/gee/abstractmap.vala
+++ b/gee/abstractmap.vala
@@ -111,13 +111,6 @@ public abstract class Gee.AbstractMap<K,V> : Object, Traversable<Map.Entry<K,V>>
/**
* { inheritDoc}
*/
- public Type element_type {
- get { return typeof (Map.Entry<K,V>); }
- }
-
- /**
- * { inheritDoc}
- */
public Iterator<Map.Entry<K,V>> iterator () {
return entries.iterator ();
}
diff --git a/gee/abstractmultiset.vala b/gee/abstractmultiset.vala
index f055332..becf7a1 100644
--- a/gee/abstractmultiset.vala
+++ b/gee/abstractmultiset.vala
@@ -173,9 +173,5 @@ public abstract class Gee.AbstractMultiSet<G> : AbstractCollection<G>, MultiSet<
_pending = 0;
_removed = false;
}
-
- public Type element_type {
- get { return typeof (G); }
- }
}
}
diff --git a/gee/arraylist.vala b/gee/arraylist.vala
index fb59d5d..86e9380 100644
--- a/gee/arraylist.vala
+++ b/gee/arraylist.vala
@@ -388,10 +388,6 @@ public class Gee.ArrayList<G> : AbstractBidirList<G> {
}
}
- public Type element_type {
- get { return typeof (G); }
- }
-
public void foreach (ForallFunc<G> f) {
assert (_stamp == _list._stamp);
if (_index < 0 || _removed)
diff --git a/gee/concurrentlist.vala b/gee/concurrentlist.vala
index fa5acf9..eb0068a 100644
--- a/gee/concurrentlist.vala
+++ b/gee/concurrentlist.vala
@@ -338,10 +338,6 @@ public class Gee.ConcurrentList<G> : AbstractList<G> {
_index++;
}
- public Type element_type {
- get { return typeof (G); }
- }
-
public new void foreach (ForallFunc<G> f) {
HazardPointer.Context ctx = new HazardPointer.Context ();
if (_started && !_removed)
diff --git a/gee/hashmap.vala b/gee/hashmap.vala
index c7d988b..81223f1 100644
--- a/gee/hashmap.vala
+++ b/gee/hashmap.vala
@@ -546,10 +546,6 @@ public class Gee.HashMap<K,V> : Gee.AbstractMap<K,V> {
assert_not_reached ();
}
- public Type element_type {
- get { return typeof (K); }
- }
-
public void foreach(ForallFunc<K> f) {
if (_node != null) {
f(_node.key);
@@ -631,10 +627,6 @@ public class Gee.HashMap<K,V> : Gee.AbstractMap<K,V> {
assert_not_reached ();
}
- public Type element_type {
- get { return typeof (V); }
- }
-
public void foreach(ForallFunc<V> f) {
if (_node != null) {
f(_node.value);
@@ -670,10 +662,6 @@ public class Gee.HashMap<K,V> : Gee.AbstractMap<K,V> {
assert_not_reached ();
}
- public Type element_type {
- get { return typeof (Entry<K, V>); }
- }
-
public void foreach(ForallFunc<Map.Entry<K,V>> f) {
if (_node != null) {
f(Entry<K,V>.entry_for<K,V> (_node));
diff --git a/gee/hashset.vala b/gee/hashset.vala
index 9af1a2c..dcf7ad0 100644
--- a/gee/hashset.vala
+++ b/gee/hashset.vala
@@ -286,10 +286,6 @@ public class Gee.HashSet<G> : AbstractSet<G> {
}
}
- public Type element_type {
- get { return typeof (G); }
- }
-
public void foreach (ForallFunc<G> f) {
assert (_stamp == _set._stamp);
if (_node != null)
diff --git a/gee/linkedlist.vala b/gee/linkedlist.vala
index 26e8a68..74976b9 100644
--- a/gee/linkedlist.vala
+++ b/gee/linkedlist.vala
@@ -605,10 +605,6 @@ public class Gee.LinkedList<G> : AbstractBidirList<G>, Queue<G>, Deque<G> {
}
}
- public Type element_type {
- get { return typeof (G); }
- }
-
public void foreach (ForallFunc<G> f) {
assert (_stamp == _list._stamp);
if (!started) {
diff --git a/gee/multimap.vala b/gee/multimap.vala
index 5698b33..89efe17 100644
--- a/gee/multimap.vala
+++ b/gee/multimap.vala
@@ -118,10 +118,10 @@ public interface Gee.MultiMap<K,V> : Object {
/**
* The type of the keys in this multimap.
*/
- public virtual Type key_type { get { return typeof (K); } }
+ public Type key_type { get { return typeof (K); } }
/**
* The type of the values in this multimap.
*/
- public virtual Type value_type { get { return typeof (V); } }
+ public Type value_type { get { return typeof (V); } }
}
diff --git a/gee/priorityqueue.vala b/gee/priorityqueue.vala
index c865dc6..a78d695 100644
--- a/gee/priorityqueue.vala
+++ b/gee/priorityqueue.vala
@@ -1035,10 +1035,6 @@ public class Gee.PriorityQueue<G> : Gee.AbstractQueue<G> {
}
}
- public Type element_type {
- get { return typeof (G); }
- }
-
public void foreach (ForallFunc<G> f) {
if (valid)
f (position.data);
diff --git a/gee/treemap.vala b/gee/treemap.vala
index ec47a22..c28679e 100644
--- a/gee/treemap.vala
+++ b/gee/treemap.vala
@@ -1629,10 +1629,6 @@ public class Gee.TreeMap<K,V> : Gee.AbstractBidirSortedMap<K,V> {
return current.key;
}
- public Type element_type {
- get { return typeof (K); }
- }
-
public void foreach (ForallFunc<K> f) {
if (current != null) {
f (current.key);
@@ -1666,10 +1662,6 @@ public class Gee.TreeMap<K,V> : Gee.AbstractBidirSortedMap<K,V> {
return iterator.current.key;
}
- public Type element_type {
- get { return typeof (K); }
- }
-
public void foreach (ForallFunc<K> f) {
if (valid)
f (iterator.current.key);
@@ -1693,10 +1685,6 @@ public class Gee.TreeMap<K,V> : Gee.AbstractBidirSortedMap<K,V> {
return current.value;
}
- public Type element_type {
- get { return typeof (V); }
- }
-
public void foreach (ForallFunc<V> f) {
if (current != null) {
f (current.key);
@@ -1730,10 +1718,6 @@ public class Gee.TreeMap<K,V> : Gee.AbstractBidirSortedMap<K,V> {
return iterator.current.value;
}
- public Type element_type {
- get { return typeof (V); }
- }
-
public void foreach (ForallFunc<V> f) {
if (valid)
f (iterator.current.key);
@@ -1761,10 +1745,6 @@ public class Gee.TreeMap<K,V> : Gee.AbstractBidirSortedMap<K,V> {
unset ();
}
- public Type element_type {
- get { return typeof (Entry<K, V>); }
- }
-
public void foreach (ForallFunc<Map.Entry<K, V>> f) {
if (current != null) {
f (Entry.entry_for<K,V> (current));
@@ -1802,10 +1782,6 @@ public class Gee.TreeMap<K,V> : Gee.AbstractBidirSortedMap<K,V> {
unset ();
}
- public Type element_type {
- get { return typeof (Entry<K, V>); }
- }
-
public void foreach (ForallFunc<Map.Entry<K, V>> f) {
if (valid)
f (Entry.entry_for<K,V> (iterator.current));
diff --git a/gee/treeset.vala b/gee/treeset.vala
index 4b7e06b..08ed5b6 100644
--- a/gee/treeset.vala
+++ b/gee/treeset.vala
@@ -715,10 +715,6 @@ public class Gee.TreeSet<G> : AbstractBidirSortedSet<G> {
}
}
- public Type element_type {
- get { return typeof (G); }
- }
-
public void foreach (ForallFunc<G> f) {
assert (stamp == _set.stamp);
if (current != null) {
@@ -1118,10 +1114,6 @@ public class Gee.TreeSet<G> : AbstractBidirSortedSet<G> {
}
}
- public Type element_type {
- get { return typeof (G); }
- }
-
public void foreach(ForallFunc<G> f) {
if(valid)
f(get());
diff --git a/gee/unfolditerator.vala b/gee/unfolditerator.vala
index 8ca4ee8..650b26d 100644
--- a/gee/unfolditerator.vala
+++ b/gee/unfolditerator.vala
@@ -60,10 +60,6 @@ internal class Gee.UnfoldIterator<G> : Object, Traversable<G>, Iterator<G> {
public bool valid { get { return _current != null; } }
public bool read_only { get { return true; } }
- public Type element_type {
- get { return typeof (G); }
- }
-
public void foreach (ForallFunc<G> f) {
if (_current != null) {
f (_current);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]