Thread (24 messages) flat view 24 messages, 4 authors, 2016-06-15

Re: [JGIT PATCH 09/12] Add getSize() method to ObjectIdSubclassMap

From: Robin Rosenberg <hidden>
Date: 2016-06-15 22:44:42

måndagen den 2 juni 2008 23.24.40 skrev Marek Zawirski:
quoted hunk ↗ jump to hunk
--- a/org.spearce.jgit/src/org/spearce/jgit/lib/ObjectIdSubclassMap.java
+++ b/org.spearce.jgit/src/org/spearce/jgit/lib/ObjectIdSubclassMap.java
@@ -107,6 +107,15 @@ public class ObjectIdSubclassMap<V extends ObjectId> {
 		size++;
 	}
 
+	/**
+	 * Returns number of objects in map.
+	 * 
+	 * @return number of objects in map
+	 */
+	public int size() {
+		return size;
+	}
Just the @return is usually enough for methods that simply return a value. If you
have both the untagged part of the comment should explain much more. Patch
10 is a good example.

-- robin
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help