libgee r29 - in trunk: . gee



Author: juergbi
Date: Mon Apr 14 21:34:11 2008
New Revision: 29
URL: http://svn.gnome.org/viewvc/libgee?rev=29&view=rev

Log:
2008-04-14  Juerg Billeter  <j bitron ch>

	* gee/arraylist.vala, gee/hashmap.vala, gee/hashset.vala,
	  gee/iterator.vala, gee/list.vala, gee/map.vala,
	  gee/readonlycollection.vala, gee/readonlylist.vala,
	  gee/readonlymap.vala, gee/readonlyset.vala: mark types as
	  nullable where appropriate


Modified:
   trunk/ChangeLog
   trunk/gee/arraylist.vala
   trunk/gee/hashmap.vala
   trunk/gee/hashset.vala
   trunk/gee/iterator.vala
   trunk/gee/list.vala
   trunk/gee/map.vala
   trunk/gee/readonlycollection.vala
   trunk/gee/readonlylist.vala
   trunk/gee/readonlymap.vala
   trunk/gee/readonlyset.vala

Modified: trunk/gee/arraylist.vala
==============================================================================
--- trunk/gee/arraylist.vala	(original)
+++ trunk/gee/arraylist.vala	Mon Apr 14 21:34:11 2008
@@ -68,7 +68,7 @@
 		return -1;
 	}
 
-	public G get (int index) {
+	public G? get (int index) {
 		assert (index >= 0 && index < _size);
 
 		return _items[index];
@@ -178,7 +178,7 @@
 			return (_index < _list._size);
 		}
 
-		public G get () {
+		public G? get () {
 			assert (_stamp == _list._stamp);
 
 			if (_index < 0 || _index >= _list._size) {

Modified: trunk/gee/hashmap.vala
==============================================================================
--- trunk/gee/hashmap.vala	(original)
+++ trunk/gee/hashmap.vala	Mon Apr 14 21:34:11 2008
@@ -91,7 +91,7 @@
 		return (*node != null);
 	}
 
-	public V get (K key) {
+	public V? get (K key) {
 		Node<K,V>* node = (*lookup_node (key));
 		if (node != null) {
 			return node->value;
@@ -251,7 +251,7 @@
 			return (_node != null);
 		}
 
-		public K get () {
+		public K? get () {
 			assert (_stamp == _map._stamp);
 			assert (_node != null);
 			return _node.key;
@@ -334,7 +334,7 @@
 			return (_node != null);
 		}
 
-		public V get () {
+		public V? get () {
 			assert (_stamp == _map._stamp);
 			assert (_node != null);
 			return _node.value;

Modified: trunk/gee/hashset.vala
==============================================================================
--- trunk/gee/hashset.vala	(original)
+++ trunk/gee/hashset.vala	Mon Apr 14 21:34:11 2008
@@ -193,7 +193,7 @@
 			return (_node != null);
 		}
 
-		public G get () {
+		public G? get () {
 			assert (_stamp == _set._stamp);
 			assert (_node != null);
 			return _node.key;

Modified: trunk/gee/iterator.vala
==============================================================================
--- trunk/gee/iterator.vala	(original)
+++ trunk/gee/iterator.vala	Mon Apr 14 21:34:11 2008
@@ -1,6 +1,6 @@
 /* iterator.vala
  *
- * Copyright (C) 2007  JÃrg Billeter
+ * Copyright (C) 2007-2008  JÃrg Billeter
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
@@ -37,6 +37,6 @@
 	 *
 	 * @return the current element in the iteration
 	 */
-	public abstract G get ();
+	public abstract G? get ();
 }
 

Modified: trunk/gee/list.vala
==============================================================================
--- trunk/gee/list.vala	(original)
+++ trunk/gee/list.vala	Mon Apr 14 21:34:11 2008
@@ -31,7 +31,7 @@
 	 *
 	 * @return      the item at the specified index in the list
 	 */
-	public abstract G get (int index);
+	public abstract G? get (int index);
 
 	/**
 	 * Sets the item at the specified index in this list.

Modified: trunk/gee/map.vala
==============================================================================
--- trunk/gee/map.vala	(original)
+++ trunk/gee/map.vala	Mon Apr 14 21:34:11 2008
@@ -60,7 +60,7 @@
 	 * @return    the value associated with the key, or null if the key
 	 *            couldn't be found
 	 */
-	public abstract V get (K key);
+	public abstract V? get (K key);
 
 	/**
 	 * Inserts a new key and value into this map.

Modified: trunk/gee/readonlycollection.vala
==============================================================================
--- trunk/gee/readonlycollection.vala	(original)
+++ trunk/gee/readonlycollection.vala	Mon Apr 14 21:34:11 2008
@@ -36,7 +36,7 @@
 
 	private Collection<G> _collection;
 
-	public ReadOnlyCollection (Collection<G> collection = null) {
+	public ReadOnlyCollection (Collection<G>? collection = null) {
 		this.collection = collection;
 	}
 
@@ -77,7 +77,7 @@
 			return false;
 		}
 
-		public G get () {
+		public G? get () {
 			return null;
 		}
 	}

Modified: trunk/gee/readonlylist.vala
==============================================================================
--- trunk/gee/readonlylist.vala	(original)
+++ trunk/gee/readonlylist.vala	Mon Apr 14 21:34:11 2008
@@ -36,7 +36,7 @@
 
 	private List<G> _list;
 
-	public ReadOnlyList (List<G> list = null) {
+	public ReadOnlyList (List<G>? list = null) {
 		this.list = list;
 	}
 
@@ -84,7 +84,7 @@
 		assert_not_reached ();
 	}
 
-	public G get (int index) {
+	public G? get (int index) {
 		if (_list == null) {
 			return null;
 		}
@@ -105,7 +105,7 @@
 			return false;
 		}
 
-		public G get () {
+		public G? get () {
 			return null;
 		}
 	}

Modified: trunk/gee/readonlymap.vala
==============================================================================
--- trunk/gee/readonlymap.vala	(original)
+++ trunk/gee/readonlymap.vala	Mon Apr 14 21:34:11 2008
@@ -36,7 +36,7 @@
 
 	private Map<K,V> _map;
 
-	public ReadOnlyMap (Map<K,V> map = null) {
+	public ReadOnlyMap (Map<K,V>? map = null) {
 		this.map = map;
 	}
 
@@ -64,7 +64,7 @@
 		return _map.contains (key);
 	}
 
-	public V get (K key) {
+	public V? get (K key) {
 		if (_map == null) {
 			return null;
 		}

Modified: trunk/gee/readonlyset.vala
==============================================================================
--- trunk/gee/readonlyset.vala	(original)
+++ trunk/gee/readonlyset.vala	Mon Apr 14 21:34:11 2008
@@ -36,7 +36,7 @@
 
 	private Set<G> _set;
 
-	public ReadOnlySet (Set<G> set = null) {
+	public ReadOnlySet (Set<G>? set = null) {
 		this.set = set;
 	}
 
@@ -77,7 +77,7 @@
 			return false;
 		}
 
-		public G get () {
+		public G? get () {
 			return null;
 		}
 	}



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]