From b6f93ea1f9d16d08ab78bbab942b5c3321491c7a Mon Sep 17 00:00:00 2001 From: Marek Zawirski Date: Fri, 30 May 2008 22:45:08 +0200 Subject: [PATCH] Add size() method to ObjectIdSubclassMap Method is based on already existing field. Signed-off-by: Marek Zawirski --- org.spearce.jgit/src/org/spearce/jgit/lib/ObjectIdSubclassMap.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/org.spearce.jgit/src/org/spearce/jgit/lib/ObjectIdSubclassMap.java b/org.spearce.jgit/src/org/spearce/jgit/lib/ObjectIdSubclassMap.java index 79ef5b6e..2a13204c 100644 --- 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,13 @@ public class ObjectIdSubclassMap { size++; } + /** + * @return number of objects in map + */ + public int size() { + return size; + } + private final int index(final AnyObjectId id) { return (id.w1 >>> 1) % obj_hash.length; } -- 2.11.4.GIT