Package org.eclipse.jgit.revwalk
Class DateRevQueue
- java.lang.Object
-
- org.eclipse.jgit.revwalk.Generator
-
- org.eclipse.jgit.revwalk.AbstractRevQueue
-
- org.eclipse.jgit.revwalk.DateRevQueue
-
public class DateRevQueue extends AbstractRevQueue
A queue of commits sorted by commit time order.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) static classDateRevQueue.Entry
-
Field Summary
Fields Modifier and Type Field Description private intfirstprivate DateRevQueue.Entryfreeprivate DateRevQueue.Entryheadprivate DateRevQueue.Entry[]indexprivate intinQueueprivate intlastprivate static intREBUILD_INDEX_COUNTprivate intsinceLastIndex-
Fields inherited from class org.eclipse.jgit.revwalk.AbstractRevQueue
EMPTY_QUEUE, outputType
-
Fields inherited from class org.eclipse.jgit.revwalk.Generator
firstParent, HAS_REWRITE, HAS_UNINTERESTING, NEEDS_REWRITE, SORT_COMMIT_TIME_DESC, SORT_TOPO
-
-
Constructor Summary
Constructors Constructor Description DateRevQueue()Create an empty date queue.DateRevQueue(boolean firstParent)DateRevQueue(Generator s)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidadd(RevCommit c)Add a commit to the queue.(package private) booleananybodyHasFlag(int f)private voidbuildIndex()voidclear()Remove all entries from this queue.(package private) booleaneverbodyHasFlag(int f)private voidfreeEntry(DateRevQueue.Entry e)private DateRevQueue.EntrynewEntry(RevCommit c)RevCommitnext()Return the next commit to the application, or the next generator.(package private) intoutputType()Obtain flags describing the output behavior of this generator.RevCommitpeek()Peek at the next commit, without removing it.java.lang.StringtoString()-
Methods inherited from class org.eclipse.jgit.revwalk.AbstractRevQueue
add, addParents, describe
-
Methods inherited from class org.eclipse.jgit.revwalk.Generator
shareFreeList
-
-
-
-
Field Detail
-
REBUILD_INDEX_COUNT
private static final int REBUILD_INDEX_COUNT
- See Also:
- Constant Field Values
-
head
private DateRevQueue.Entry head
-
free
private DateRevQueue.Entry free
-
inQueue
private int inQueue
-
sinceLastIndex
private int sinceLastIndex
-
index
private DateRevQueue.Entry[] index
-
first
private int first
-
last
private int last
-
-
Constructor Detail
-
DateRevQueue
public DateRevQueue()
Create an empty date queue.
-
DateRevQueue
DateRevQueue(boolean firstParent)
-
DateRevQueue
DateRevQueue(Generator s) throws MissingObjectException, IncorrectObjectTypeException, java.io.IOException
- Throws:
MissingObjectExceptionIncorrectObjectTypeExceptionjava.io.IOException
-
-
Method Detail
-
add
public void add(RevCommit c)
Add a commit to the queue.This method always adds the commit, even if it is already in the queue or previously was in the queue but has already been removed. To control queue admission use
AbstractRevQueue.add(RevCommit, RevFlag).- Specified by:
addin classAbstractRevQueue- Parameters:
c- commit to add.
-
next
public RevCommit next()
Return the next commit to the application, or the next generator.Remove the first commit from the queue.
- Specified by:
nextin classAbstractRevQueue- Returns:
- next available commit; null if no more are to be returned.
-
buildIndex
private void buildIndex()
-
peek
public RevCommit peek()
Peek at the next commit, without removing it.- Returns:
- the next available commit; null if there are no commits left.
-
clear
public void clear()
Remove all entries from this queue.- Specified by:
clearin classAbstractRevQueue
-
everbodyHasFlag
boolean everbodyHasFlag(int f)
- Specified by:
everbodyHasFlagin classAbstractRevQueue
-
anybodyHasFlag
boolean anybodyHasFlag(int f)
- Specified by:
anybodyHasFlagin classAbstractRevQueue
-
outputType
int outputType()
Description copied from class:GeneratorObtain flags describing the output behavior of this generator.- Overrides:
outputTypein classAbstractRevQueue- Returns:
- one or more of the constants declared in this class, describing how this generator produces its results.
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
newEntry
private DateRevQueue.Entry newEntry(RevCommit c)
-
freeEntry
private void freeEntry(DateRevQueue.Entry e)
-
-