Top Description Inners Fields Constructors Methods
org.eclipse.jgit.revwalk

pack-priv Class DateRevPriorityQueue

extends DateRevQueue
Class Inheritance
Imports
java.util.concurrent.atomic.AtomicInteger, org.eclipse.jgit.annotations.Nullable, org.eclipse.jgit.errors.IncorrectObjectTypeException, .MissingObjectException, org.eclipse.jgit.internal.JGitText, java.io.IOException, java.util.Comparator, .PriorityQueue

A queue of commits sorted by commit time order using a Java PriorityQueue. For the commits with the same commit time insertion order will be preserved.

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class

Field Summary

Modifier and TypeField and Description
private PriorityQueue<DateRevPriorityQueue.RevCommitEntry>
private final AtomicInteger

Constructor Summary

AccessConstructor and Description
public
DateRevPriorityQueue()

Create an empty queue of commits sorted by commit time order.

pack-priv
DateRevPriorityQueue(boolean
treat first element as a parent
firstParent
)

Create an empty queue of commits sorted by commit time order.

pack-priv

Method Summary

Modifier and TypeMethod and Description
public void
add(RevCommit
commit to add.
c
)

Overrides org.eclipse.jgit.revwalk.DateRevQueue.add.

Add a commit to the queue.

pack-priv boolean
public void
clear()

Overrides org.eclipse.jgit.revwalk.DateRevQueue.clear.

Remove all entries from this queue.

pack-priv boolean
private void
public RevCommit
next()

Overrides org.eclipse.jgit.revwalk.DateRevQueue.next.

Remove the first commit from the queue.

pack-priv int
outputType()

Overrides org.eclipse.jgit.revwalk.DateRevQueue.outputType.

Obtain flags describing the output behavior of this generator.

public RevCommit

Returns:

the next available commit; null if there are no commits left.
peek
()

Overrides org.eclipse.jgit.revwalk.DateRevQueue.peek.

Peek at the next commit, without removing it.

public String
toString()

Overrides org.eclipse.jgit.revwalk.DateRevQueue.toString.

Returns a string representation of the object.

Field Detail

queueback to summary
private PriorityQueue<DateRevPriorityQueue.RevCommitEntry> queue
sequenceback to summary
private final AtomicInteger sequence

Constructor Detail

DateRevPriorityQueueback to summary
public DateRevPriorityQueue()

Create an empty queue of commits sorted by commit time order.

DateRevPriorityQueueback to summary
pack-priv DateRevPriorityQueue(boolean firstParent)

Create an empty queue of commits sorted by commit time order.

Parameters
firstParent:boolean

treat first element as a parent

DateRevPriorityQueueback to summary
pack-priv DateRevPriorityQueue(Generator s) throws MissingObjectException, IncorrectObjectTypeException, IOException

Method Detail

addback to summary
public void add(RevCommit c)

Overrides org.eclipse.jgit.revwalk.DateRevQueue.add.

Doc from org.eclipse.jgit.revwalk.AbstractRevQueue.add.

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:RevCommit

commit to add.

Annotations
@Override
anybodyHasFlagback to summary
pack-priv boolean anybodyHasFlag(int f)

Overrides org.eclipse.jgit.revwalk.DateRevQueue.anybodyHasFlag.

Annotations
@Override
clearback to summary
public void clear()

Overrides org.eclipse.jgit.revwalk.DateRevQueue.clear.

Doc from org.eclipse.jgit.revwalk.AbstractRevQueue.clear.

Remove all entries from this queue.

Annotations
@Override
everbodyHasFlagback to summary
pack-priv boolean everbodyHasFlag(int f)

Overrides org.eclipse.jgit.revwalk.DateRevQueue.everbodyHasFlag.

Annotations
@Override
initPriorityQueueback to summary
private void initPriorityQueue()
nextback to summary
public RevCommit next()

Overrides org.eclipse.jgit.revwalk.DateRevQueue.next.

Doc from org.eclipse.jgit.revwalk.AbstractRevQueue.next.

Remove the first commit from the queue.

Returns:RevCommit

Doc from org.eclipse.jgit.revwalk.Generator.next.

next available commit; null if no more are to be returned.

Annotations
@Override
outputTypeback to summary
pack-priv int outputType()

Overrides org.eclipse.jgit.revwalk.DateRevQueue.outputType.

Doc from org.eclipse.jgit.revwalk.Generator.outputType.

Obtain flags describing the output behavior of this generator.

Returns:int

one or more of the constants declared in this class, describing how this generator produces its results.

Annotations
@Override
peekback to summary
public RevCommit peek()

Overrides org.eclipse.jgit.revwalk.DateRevQueue.peek.

Peek at the next commit, without removing it.

Returns:RevCommit

the next available commit; null if there are no commits left.

Annotations
@Override
@Nullable
toStringback to summary
public String toString()

Overrides org.eclipse.jgit.revwalk.DateRevQueue.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object. Satisfying this method's contract implies a non-null result must be returned.

Returns:String

a string representation of the object

Annotations
@Override
org.eclipse.jgit.revwalk back to summary

private Class DateRevPriorityQueue.RevCommitEntry

extends Object
Class Inheritance

Field Summary

Modifier and TypeField and Description
private final RevCommit
private final int

Constructor Summary

AccessConstructor and Description
public
RevCommitEntry(int insertSequenceNumber, RevCommit entry)

Method Summary

Modifier and TypeMethod and Description
public RevCommit
public int
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

entryback to summary
private final RevCommit entry
insertSequenceNumberback to summary
private final int insertSequenceNumber

Constructor Detail

RevCommitEntryback to summary
public RevCommitEntry(int insertSequenceNumber, RevCommit entry)

Method Detail

getEntryback to summary
public RevCommit getEntry()
getInsertSequenceNumberback to summary
public int getInsertSequenceNumber()