Package org.eclipse.jgit.revwalk
Class AbstractRevQueue
- java.lang.Object
-
- org.eclipse.jgit.revwalk.Generator
-
- org.eclipse.jgit.revwalk.AbstractRevQueue
-
- Direct Known Subclasses:
AbstractRevQueue.AlwaysEmptyQueue
,BlockRevQueue
,DateRevQueue
abstract class AbstractRevQueue extends Generator
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static class
AbstractRevQueue.AlwaysEmptyQueue
-
Field Summary
Fields Modifier and Type Field Description (package private) static AbstractRevQueue
EMPTY_QUEUE
(package private) int
outputType
Current output flags set for this generator instance.-
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 AbstractRevQueue(boolean firstParent)
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract void
add(RevCommit c)
Add a commit to the queue.void
add(RevCommit c, RevFlag queueControl)
Add a commit if it does not have a flag set yet, then set the flag.void
addParents(RevCommit c, RevFlag queueControl)
Add a commit's parents if one does not have a flag set yet.(package private) abstract boolean
anybodyHasFlag(int f)
abstract void
clear()
Remove all entries from this queue.protected static void
describe(java.lang.StringBuilder s, RevCommit c)
Describe this queue(package private) abstract boolean
everbodyHasFlag(int f)
abstract RevCommit
next()
Return the next commit to the application, or the next generator.(package private) int
outputType()
Obtain flags describing the output behavior of this generator.-
Methods inherited from class org.eclipse.jgit.revwalk.Generator
shareFreeList
-
-
-
-
Field Detail
-
EMPTY_QUEUE
static final AbstractRevQueue EMPTY_QUEUE
-
outputType
int outputType
Current output flags set for this generator instance.
-
-
Method Detail
-
add
public abstract 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
add(RevCommit, RevFlag)
.- Parameters:
c
- commit to add.
-
add
public final void add(RevCommit c, RevFlag queueControl)
Add a commit if it does not have a flag set yet, then set the flag.This method permits the application to test if the commit has the given flag; if it does not already have the flag than the commit is added to the queue and the flag is set. This later will prevent the commit from being added twice.
- Parameters:
c
- commit to add.queueControl
- flag that controls admission to the queue.
-
addParents
public final void addParents(RevCommit c, RevFlag queueControl)
Add a commit's parents if one does not have a flag set yet.This method permits the application to test if the commit has the given flag; if it does not already have the flag than the commit is added to the queue and the flag is set. This later will prevent the commit from being added twice.
- Parameters:
c
- commit whose parents should be added.queueControl
- flag that controls admission to the queue.
-
next
public abstract RevCommit next()
Return the next commit to the application, or the next generator.Remove the first commit from the queue.
-
clear
public abstract void clear()
Remove all entries from this queue.
-
everbodyHasFlag
abstract boolean everbodyHasFlag(int f)
-
anybodyHasFlag
abstract boolean anybodyHasFlag(int f)
-
outputType
int outputType()
Description copied from class:Generator
Obtain flags describing the output behavior of this generator.- Specified by:
outputType
in classGenerator
- Returns:
- one or more of the constants declared in this class, describing how this generator produces its results.
-
-