Commit ac152534 authored by Didier 'Ptitjes's avatar Didier 'Ptitjes
Browse files

Hide inherited get and set methods from GLib.Object


Signed-off-by: default avatarJulien Fontanet <julien.fontanet@isonoe.net>
parent 9d4b0f3c
......@@ -68,13 +68,13 @@ public class Gee.ArrayList<G> : Object, Iterable<G>, Collection<G>, List<G> {
return -1;
}
public G? get (int index) {
public new G? get (int index) {
assert (index >= 0 && index < _size);
return _items[index];
}
public void set (int index, G item) {
public new void set (int index, G item) {
assert (index >= 0 && index < _size);
_items[index] = item;
......@@ -191,7 +191,7 @@ public class Gee.ArrayList<G> : Object, Iterable<G>, Collection<G>, List<G> {
return (_index < _list._size);
}
public G? get () {
public new G? get () {
assert (_stamp == _list._stamp);
if (_index < 0 || _index >= _list._size) {
......
......@@ -91,7 +91,7 @@ public class Gee.HashMap<K,V> : Object, Map<K,V> {
return (*node != null);
}
public V? get (K key) {
public new V? get (K key) {
Node<K,V>* node = (*lookup_node (key));
if (node != null) {
return node->value;
......@@ -100,7 +100,7 @@ public class Gee.HashMap<K,V> : Object, Map<K,V> {
}
}
public void set (K key, V value) {
public new void set (K key, V value) {
Node<K,V>** node = lookup_node (key);
if (*node != null) {
(*node)->value = value;
......@@ -257,7 +257,7 @@ public class Gee.HashMap<K,V> : Object, Map<K,V> {
return (_node != null);
}
public K? get () {
public new K? get () {
assert (_stamp == _map._stamp);
assert (_node != null);
return _node.key;
......@@ -340,7 +340,7 @@ public class Gee.HashMap<K,V> : Object, Map<K,V> {
return (_node != null);
}
public V? get () {
public new V? get () {
assert (_stamp == _map._stamp);
assert (_node != null);
return _node.value;
......
......@@ -170,7 +170,7 @@ public class Gee.HashSet<G> : Object, Iterable<G>, Collection<G>, Set<G> {
}
private class Iterator<G> : Object, Gee.Iterator<G> {
public HashSet<G> set {
public new HashSet<G> set {
set {
_set = value;
_stamp = _set._stamp;
......@@ -199,7 +199,7 @@ public class Gee.HashSet<G> : Object, Iterable<G>, Collection<G>, Set<G> {
return (_node != null);
}
public G? get () {
public new G? get () {
assert (_stamp == _set._stamp);
assert (_node != null);
return _node.key;
......
......@@ -77,7 +77,7 @@ public class Gee.ReadOnlyCollection<G> : Object, Iterable<G>, Collection<G> {
return false;
}
public G? get () {
public new G? get () {
return null;
}
}
......
......@@ -84,7 +84,7 @@ public class Gee.ReadOnlyList<G> : Object, Iterable<G>, Collection<G>, List<G> {
assert_not_reached ();
}
public G? get (int index) {
public new G? get (int index) {
if (_list == null) {
return null;
}
......@@ -92,7 +92,7 @@ public class Gee.ReadOnlyList<G> : Object, Iterable<G>, Collection<G>, List<G> {
return _list.get (index);
}
public void set (int index, G o) {
public new void set (int index, G o) {
assert_not_reached ();
}
......@@ -109,7 +109,7 @@ public class Gee.ReadOnlyList<G> : Object, Iterable<G>, Collection<G>, List<G> {
return false;
}
public G? get () {
public new G? get () {
return null;
}
}
......
......@@ -64,7 +64,7 @@ public class Gee.ReadOnlyMap<K,V> : Object, Map<K,V> {
return _map.contains (key);
}
public V? get (K key) {
public new V? get (K key) {
if (_map == null) {
return null;
}
......@@ -72,7 +72,7 @@ public class Gee.ReadOnlyMap<K,V> : Object, Map<K,V> {
return _map.get (key);
}
public void set (K key, V value) {
public new void set (K key, V value) {
assert_not_reached ();
}
......
......@@ -30,7 +30,7 @@ public class Gee.ReadOnlySet<G> : Object, Iterable<G>, Collection<G>, Set<G> {
get { return _set.size; }
}
public Set<G> set {
public new Set<G> set {
set { _set = value; }
}
......@@ -77,7 +77,7 @@ public class Gee.ReadOnlySet<G> : Object, Iterable<G>, Collection<G>, Set<G> {
return false;
}
public G? get () {
public new G? get () {
return null;
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment