[libgee] Some more documentation enhancements



commit f8062c23c86281e67ea897fc0654fd03402e2137
Author: Didier 'Ptitjes <ptitjes free fr>
Date:   Mon Sep 28 19:22:25 2009 +0200

    Some more documentation enhancements

 gee/bidiriterator.vala |    6 +++---
 gee/collection.vala    |   18 +++++++++---------
 gee/deque.vala         |   19 ++++++++++++-------
 gee/iterator.vala      |    6 +++---
 gee/list.vala          |    2 +-
 gee/map.vala           |   26 +++++++++++++++-----------
 gee/mapiterator.vala   |    6 +++---
 gee/multimap.vala      |    6 +++---
 gee/queue.vala         |   27 +++++++++++++++------------
 gee/set.vala           |    2 +-
 10 files changed, 65 insertions(+), 53 deletions(-)
---
diff --git a/gee/bidiriterator.vala b/gee/bidiriterator.vala
index 070dd06..e4cf8d6 100644
--- a/gee/bidiriterator.vala
+++ b/gee/bidiriterator.vala
@@ -27,21 +27,21 @@ public interface Gee.BidirIterator<G> : Gee.Iterator<G> {
 	/**
 	 * Rewinds to the previous element in the iteration.
 	 *
-	 * @return true if the iterator has a previous element
+	 * @return `true` if the iterator has a previous element
 	 */
 	public abstract bool previous ();
 
 	/**
 	 * Checks whether there is a previous element in the iteration.
 	 *
-	 * @return true if the iterator has a previous element
+	 * @return `true` if the iterator has a previous element
 	 */
 	public abstract bool has_previous ();
 
 	/**
 	 * Advances to the last element in the iteration.
 	 *
-	 * @return true if the iterator has a last element
+	 * @return `true` if the iterator has a last element
 	 */
 	public abstract bool last ();
 }
diff --git a/gee/collection.vala b/gee/collection.vala
index c4e9122..cf988c7 100644
--- a/gee/collection.vala
+++ b/gee/collection.vala
@@ -39,7 +39,7 @@ public interface Gee.Collection<G> : Iterable<G> {
 	 *
 	 * @param item the item to locate in the collection
 	 *
-	 * @return     true if item is found, false otherwise
+	 * @return     `true` if item is found, `false` otherwise
 	 */
 	public abstract bool contains (G item);
 
@@ -49,7 +49,7 @@ public interface Gee.Collection<G> : Iterable<G> {
 	 *
 	 * @param item the item to add to the collection
 	 *
-	 * @return     true if the collection has been changed, false otherwise
+	 * @return     `true` if the collection has been changed, `false` otherwise
 	 */
 	public abstract bool add (G item);
 
@@ -59,7 +59,7 @@ public interface Gee.Collection<G> : Iterable<G> {
 	 *
 	 * @param item the item to remove from the collection
 	 *
-	 * @return     true if the collection has been changed, false otherwise
+	 * @return     `true` if the collection has been changed, `false` otherwise
 	 */
 	public abstract bool remove (G item);
 
@@ -75,18 +75,18 @@ public interface Gee.Collection<G> : Iterable<G> {
 	 * @param collection the collection which items will be added to this
 	 *                   collection.
 	 *
-	 * @return     true if the collection has been changed, false otherwise
+	 * @return     `true` if the collection has been changed, `false` otherwise
 	 */
 	public abstract bool add_all (Collection<G> collection);
 
 	/**
-	 * Returns true it this collection contains all items as the input
+	 * Returns `true` it this collection contains all items as the input
 	 * collection.
 	 *
 	 * @param collection the collection which items will be compared with
 	 *                   this collection.
 	 *
-	 * @return     true if the collection has been changed, false otherwise
+	 * @return     `true` if the collection has been changed, `false` otherwise
 	 */
 	public abstract bool contains_all (Collection<G> collection);
 
@@ -99,7 +99,7 @@ public interface Gee.Collection<G> : Iterable<G> {
 	 * @param collection the collection which items will be compared with
 	 *                   this collection.
 	 *
-	 * @return     true if the collection has been changed, false otherwise
+	 * @return     `true` if the collection has been changed, `false` otherwise
 	 */
 	public abstract bool remove_all (Collection<G> collection);
 
@@ -111,7 +111,7 @@ public interface Gee.Collection<G> : Iterable<G> {
 	 * @param collection the collection which items will be compared with
 	 *                   this collection.
 	 *
-	 * @return     true if the collection has been changed, false otherwise
+	 * @return     `true` if the collection has been changed, `false` otherwise
 	 */
 	public abstract bool retain_all (Collection<G> collection);
 
@@ -123,7 +123,7 @@ public interface Gee.Collection<G> : Iterable<G> {
 	public abstract G[] to_array();
 
 	/**
-	 * Property giving access to the read-only view of this collection.
+	 * The read-only view of this collection.
 	 */
 	public abstract Collection<G> read_only_view { owned get; }
 
diff --git a/gee/deque.vala b/gee/deque.vala
index 8295fd3..12acae1 100644
--- a/gee/deque.vala
+++ b/gee/deque.vala
@@ -52,21 +52,23 @@ public interface Gee.Deque<G> : Queue<G> {
 	 *
 	 * @param element the element to offer to the queue
 	 *
-	 * @return        true if the element was added to the queue
+	 * @return        `true` if the element was added to the queue
 	 */
 	public abstract bool offer_head (G element);
 
 	/**
 	 * Peeks (retrieves, but not remove) an element from this queue.
 	 *
-	 * @return the element peeked from the queue (or null if none was available)
+	 * @return the element peeked from the queue (or `null` if none was
+	 *         available)
 	 */
 	public abstract G? peek_head ();
 
 	/**
 	 * Polls (retrieves and remove) an element from the head of this queue.
 	 *
-	 * @return the element polled from the queue (or null if none was available)
+	 * @return the element polled from the queue (or `null` if none was
+	 *         available)
 	 */
 	public abstract G? poll_head ();
 
@@ -86,21 +88,24 @@ public interface Gee.Deque<G> : Queue<G> {
 	 *
 	 * @param element the element to offer to the queue
 	 *
-	 * @return        true if the element was added to the queue
+	 * @return        `true` if the element was added to the queue
 	 */
 	public abstract bool offer_tail (G element);
 
 	/**
-	 * Peeks (retrieves, but not remove) an element from the tail of this queue.
+	 * Peeks (retrieves, but not remove) an element from the tail of this
+	 * queue.
 	 *
-	 * @return the element peeked from the queue (or null if none was available)
+	 * @return the element peeked from the queue (or `null` if none was
+	 *         available)
 	 */
 	public abstract G? peek_tail ();
 
 	/**
 	 * Polls (retrieves and remove) an element from the tail of this queue.
 	 *
-	 * @return the element polled from the queue (or null if none was available)
+	 * @return the element polled from the queue (or `null` if none was
+	 *         available)
 	 */
 	public abstract G? poll_tail ();
 
diff --git a/gee/iterator.vala b/gee/iterator.vala
index 078ffb6..56111c4 100644
--- a/gee/iterator.vala
+++ b/gee/iterator.vala
@@ -38,21 +38,21 @@ public interface Gee.Iterator<G> : Object {
 	/**
 	 * Advances to the next element in the iteration.
 	 *
-	 * @return true if the iterator has a next element
+	 * @return `true` if the iterator has a next element
 	 */
 	public abstract bool next ();
 
 	/**
 	 * Checks whether there is a next element in the iteration.
 	 *
-	 * @return true if the iterator has a next element
+	 * @return `true` if the iterator has a next element
 	 */
 	public abstract bool has_next ();
 
 	/**
 	 * Rewinds to the first element in the iteration.
 	 *
-	 * @return true if the iterator has a first element
+	 * @return `true` if the iterator has a first element
 	 */
 	public abstract bool first ();
 
diff --git a/gee/list.vala b/gee/list.vala
index 3537a05..d5193e3 100644
--- a/gee/list.vala
+++ b/gee/list.vala
@@ -114,7 +114,7 @@ public interface Gee.List<G> : Collection<G> {
 	public abstract void sort (CompareFunc? compare_func = null);
 
 	/**
-	 * Property giving access to the read-only view of this list.
+	 * The read-only view of this list.
 	 */
 	public abstract new List<G> read_only_view { owned get; }
 
diff --git a/gee/map.vala b/gee/map.vala
index 987300d..1a2bed7 100644
--- a/gee/map.vala
+++ b/gee/map.vala
@@ -69,7 +69,7 @@ public interface Gee.Map<K,V> : Object, Iterable<Map.Entry<K,V>> {
 	 *
 	 * @param key the key to locate in the map
 	 *
-	 * @return    true if key is found, false otherwise
+	 * @return    `true` if key is found, `false` otherwise
 	 */
 	public abstract bool has_key (K key);
 
@@ -78,7 +78,8 @@ public interface Gee.Map<K,V> : Object, Iterable<Map.Entry<K,V>> {
 	 *
 	 * @param key the key to locate in the map
 	 *
-	 * @return    true if key is found, false otherwise
+	 * @return    `true` if key is found, `false` otherwise
+	 *
 	 * @deprecated Use { link has_key} method instead.
 	 */
 	public abstract bool contains (K key);
@@ -89,7 +90,7 @@ public interface Gee.Map<K,V> : Object, Iterable<Map.Entry<K,V>> {
 	 * @param key the key to locate in the map
 	 * @param value the corresponding value
 	 *
-	 * @return    true if key is found, false otherwise
+	 * @return    `true` if key is found, `false` otherwise
 	 */
 	public abstract bool has (K key, V value);
 
@@ -98,7 +99,7 @@ public interface Gee.Map<K,V> : Object, Iterable<Map.Entry<K,V>> {
 	 *
 	 * @param key the key whose value is to be retrieved
 	 *
-	 * @return    the value associated with the key, or null if the key
+	 * @return    the value associated with the key, or `null` if the key
 	 *            couldn't be found
 	 */
 	public abstract V? get (K key);
@@ -117,7 +118,7 @@ public interface Gee.Map<K,V> : Object, Iterable<Map.Entry<K,V>> {
 	 * @param key   the key to remove from the map
 	 * @param value the receiver variable for the removed value
 	 *
-	 * @return    true if the map has been changed, false otherwise
+	 * @return    `true` if the map has been changed, `false` otherwise
 	 */
 	public abstract bool unset (K key, out V? value = null);
 
@@ -127,7 +128,8 @@ public interface Gee.Map<K,V> : Object, Iterable<Map.Entry<K,V>> {
 	 * @param key   the key to remove from the map
 	 * @param value the receiver variable for the removed value
 	 *
-	 * @return    true if the map has been changed, false otherwise
+	 * @return    `true` if the map has been changed, `false` otherwise
+	 *
 	 * @deprecated Use { link unset} method instead.
 	 */
 	public abstract bool remove (K key, out V? value = null);
@@ -165,27 +167,29 @@ public interface Gee.Map<K,V> : Object, Iterable<Map.Entry<K,V>> {
 	 * and this map.
 	 *
 	 * @param map the map which common items are deleted from this map
+	 *
 	 * @deprecated Use { link unset_all} method instead.
 	 */
 	public abstract bool remove_all (Map<K,V> map);
 
 	/**
-	 * Returns true it this map contains all items as the input map.
+	 * Returns `true` it this map contains all items as the input map.
 	 *
-	 * @param map the map which items will be compared with this map.
+	 * @param map the map which items will be compared with this map
 	 */
 	public abstract bool has_all (Map<K,V> map);
 
 	/**
-	 * Returns true it this map contains all items as the input map.
+	 * Returns `true` it this map contains all items as the input map.
+	 *
+	 * @param map the map which items will be compared with this map
 	 *
-	 * @param map the map which items will be compared with this map.
 	 * @deprecated Use { link has_all} method instead.
 	 */
 	public abstract bool contains_all (Map<K,V> map);
 
 	/**
-	 * Property giving access to the read-only view this map.
+	 * The read-only view this map.
 	 */
 	public abstract Map<K,V> read_only_view { owned get; }
 
diff --git a/gee/mapiterator.vala b/gee/mapiterator.vala
index db614b3..485168a 100644
--- a/gee/mapiterator.vala
+++ b/gee/mapiterator.vala
@@ -36,21 +36,21 @@ public interface Gee.MapIterator<K,V> : Object {
 	/**
 	 * Advances to the next entry in the iteration.
 	 *
-	 * @return true if the iterator has a next entry
+	 * @return `true` if the iterator has a next entry
 	 */
 	public abstract bool next ();
 
 	/**
 	 * Checks whether there is a next entry in the iteration.
 	 *
-	 * @return true if the iterator has a next entry
+	 * @return `true` if the iterator has a next entry
 	 */
 	public abstract bool has_next ();
 
 	/**
 	 * Rewinds to the first entry in the iteration.
 	 *
-	 * @return true if the iterator has a first entry
+	 * @return `true` if the iterator has a first entry
 	 */
 	public abstract bool first ();
 
diff --git a/gee/multimap.vala b/gee/multimap.vala
index 5d6f2b3..d358646 100644
--- a/gee/multimap.vala
+++ b/gee/multimap.vala
@@ -55,7 +55,7 @@ public interface Gee.MultiMap<K,V> : Object {
 	 *
 	 * @param key the key to locate in the map
 	 *
-	 * @return    true if key is found, false otherwise
+	 * @return    `true` if key is found, `false` otherwise
 	 */
 	public abstract bool contains (K key);
 
@@ -82,7 +82,7 @@ public interface Gee.MultiMap<K,V> : Object {
 	 * @param key   the key to remove from the map
 	 * @param value the value to remove from the map
 	 *
-	 * @return      true if the map has been changed, false otherwise
+	 * @return      `true` if the map has been changed, `false` otherwise
 	 */
 	public abstract bool remove (K key, V value);
 
@@ -92,7 +92,7 @@ public interface Gee.MultiMap<K,V> : Object {
 	 *
 	 * @param key the key to remove from the map
 	 *
-	 * @return    true if the map has been changed, false otherwise
+	 * @return    `true` if the map has been changed, `false` otherwise
 	 */
 	public abstract bool remove_all (K key);
 
diff --git a/gee/queue.vala b/gee/queue.vala
index cc67e56..3464c36 100644
--- a/gee/queue.vala
+++ b/gee/queue.vala
@@ -30,18 +30,18 @@
  *
  * This interface defines methods that will never fail whatever the state of
  * the queue is. For capacity-bounded queues, those methods will either return
- * false or null to specify that the insert or retrieval did not occur because
- * the queue was full or empty.
+ * `false` or `null` to specify that the insert or retrieval did not occur
+ * because the queue was full or empty.
  *
  * Queue implementations are not limited to First-In-First-Out behavior and can
  * propose different ordering of their elements. Each Queue implementation have
  * to specify how it orders its elements.
  *
- * Queue implementations do not allow insertion of null elements, although some
- * implementations, such as { link LinkedList}, do not prohibit insertion of
- * null. Even in the implementations that permit it, null should not be
- * inserted into a Queue, as null is also used as a special return value by the
- * poll method to indicate that the queue contains no elements.
+ * Queue implementations do not allow insertion of `null` elements, although
+ * some implementations, such as { link LinkedList}, do not prohibit insertion
+ * of `null`. Even in the implementations that permit it, `null` should not be
+ * inserted into a Queue, as `null` is also used as a special return value by
+ * the poll method to indicate that the queue contains no elements.
  */
 public interface Gee.Queue<G> : Collection<G> {
 
@@ -51,12 +51,13 @@ public interface Gee.Queue<G> : Collection<G> {
 	public static const int UNBOUNDED_CAPACITY = -1;
 
 	/**
-	 * The capacity of this queue (or null if capacity is not bound).
+	 * The capacity of this queue (or `null` if capacity is not bound).
 	 */
 	public abstract int capacity { get; }
 
 	/**
-	 * The remaining capacity of this queue (or null if capacity is not bound).
+	 * The remaining capacity of this queue (or `null` if capacity is not
+	 * bound).
 	 */
 	public abstract int remaining_capacity { get; }
 
@@ -70,21 +71,23 @@ public interface Gee.Queue<G> : Collection<G> {
 	 *
 	 * @param element the element to offer to the queue
 	 *
-	 * @return        true if the element was added to the queue
+	 * @return        `true` if the element was added to the queue
 	 */
 	public abstract bool offer (G element);
 
 	/**
 	 * Peeks (retrieves, but not remove) an element from this queue.
 	 *
-	 * @return the element peeked from the queue (or null if none was available)
+	 * @return the element peeked from the queue (or `null` if none was
+	 *         available)
 	 */
 	public abstract G? peek ();
 
 	/**
 	 * Polls (retrieves and remove) an element from this queue.
 	 *
-	 * @return the element polled from the queue (or null if none was available)
+	 * @return the element polled from the queue (or `null` if none was
+	 *         available)
 	 */
 	public abstract G? poll ();
 
diff --git a/gee/set.vala b/gee/set.vala
index 019d906..eec4175 100644
--- a/gee/set.vala
+++ b/gee/set.vala
@@ -26,7 +26,7 @@
 public interface Gee.Set<G> : Collection<G> {
 
 	/**
-	 * Property giving access to the read-only view of this set.
+	 * The read-only view of this set.
 	 */
 	public abstract new Set<G> read_only_view { owned get; }
 



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