diff options
Diffstat (limited to 'org.eclipse.jgit')
-rw-r--r-- | org.eclipse.jgit/src/org/eclipse/jgit/lib/ObjectIdSubclassMap.java | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/lib/ObjectIdSubclassMap.java b/org.eclipse.jgit/src/org/eclipse/jgit/lib/ObjectIdSubclassMap.java index bd57c061b6..a0b6d0ed24 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/lib/ObjectIdSubclassMap.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/lib/ObjectIdSubclassMap.java @@ -98,6 +98,17 @@ public class ObjectIdSubclassMap<V extends ObjectId> implements Iterable<V> { } /** + * Returns true if this map contains the specified object. + * + * @param toFind + * object to find. + * @return true if the mapping exists for this object; false otherwise. + */ + public boolean contains(final AnyObjectId toFind) { + return get(toFind) != null; + } + + /** * Store an object for future lookup. * <p> * An existing mapping for <b>must not</b> be in this map. Callers must |