diff options
author | Shawn O. Pearce <spearce@spearce.org> | 2009-10-02 09:27:42 -0700 |
---|---|---|
committer | Shawn O. Pearce <spearce@spearce.org> | 2009-10-02 09:27:42 -0700 |
commit | 6828372f3e56160a447ed629933a0cd3a6ae9136 (patch) | |
tree | 3501664100054083145e575689fe3181f87807c6 /org.eclipse.jgit/src/org/eclipse/jgit/revwalk | |
parent | 36b0dcf6cbae6ba25a96bf2b2bd5251f7af8904d (diff) | |
download | jgit-6828372f3e56160a447ed629933a0cd3a6ae9136.tar.gz jgit-6828372f3e56160a447ed629933a0cd3a6ae9136.zip |
Document protected members of RevObjectList
Recently Eclipse started complaining about undocumented protected
members here, so lets document them to make the errors go away.
Change-Id: Ia3bc9fa69854953db5dc9a982821a2f3abe8d05a
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Diffstat (limited to 'org.eclipse.jgit/src/org/eclipse/jgit/revwalk')
-rw-r--r-- | org.eclipse.jgit/src/org/eclipse/jgit/revwalk/RevObjectList.java | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/RevObjectList.java b/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/RevObjectList.java index c67b1006fa..616a40aa8a 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/RevObjectList.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/RevObjectList.java @@ -1,4 +1,5 @@ /* + * Copyright (C) 2009, Google Inc. * Copyright (C) 2009, Jonas Fonseca <fonseca@diku.dk> * Copyright (C) 2008, Shawn O. Pearce <spearce@spearce.org> * and other copyright owners as documented in the project's IP log. @@ -57,12 +58,21 @@ public class RevObjectList<E extends RevObject> extends AbstractList<E> { static final int BLOCK_SIZE = 1 << BLOCK_SHIFT; + /** + * Items stored in this list. + * <p> + * If {@link Block#shift} = 0 this block holds the list elements; otherwise + * it holds pointers to other {@link Block} instances which use a shift that + * is {@link #BLOCK_SHIFT} smaller. + */ protected Block contents = new Block(0); + /** Current number of elements in the list. */ protected int size = 0; /** Create an empty object list. */ public RevObjectList() { + // Initialized above. } public void add(final int index, final E element) { @@ -113,6 +123,7 @@ public class RevObjectList<E extends RevObject> extends AbstractList<E> { size = 0; } + /** One level of contents, either an intermediate level or a leaf level. */ protected static class Block { final Object[] contents = new Object[BLOCK_SIZE]; |