]> source.dussan.org Git - jgit.git/commit
Add internal API for note iteration 53/1853/4
authorShawn O. Pearce <spearce@spearce.org>
Fri, 5 Nov 2010 01:46:19 +0000 (18:46 -0700)
committerShawn O. Pearce <spearce@spearce.org>
Fri, 12 Nov 2010 22:01:28 +0000 (14:01 -0800)
commit3728918d72e3ff2e7540becadf719957d8d75d70
tree4246dbda23fdc864c4693138eb31940a1092da7b
parent3e2b9b691ed30d53750cc08c2b89577b78e6d19a
Add internal API for note iteration

Some algorithms need to be able to iterate through all notes within a
particular bucket, such as when splitting or combining a bucket.
Exposing an Iterator<Note> makes this traversal possible.

For a LeafBucket the iteration is simple, its over the sorted array of
elements.  For FanoutBucket its a bit more complex as the iteration
needs to union the iterators of each fanout bucket, lazily loading any
buckets that aren't already in-memory.

Change-Id: I3d5279b11984f44dcf0ddb14a82a4b4e51d4632d
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
org.eclipse.jgit/src/org/eclipse/jgit/notes/FanoutBucket.java
org.eclipse.jgit/src/org/eclipse/jgit/notes/LeafBucket.java
org.eclipse.jgit/src/org/eclipse/jgit/notes/NoteBucket.java