Package org.eclipse.jgit.revplot
Class PlotCommit<L extends PlotLane>
java.lang.Object
org.eclipse.jgit.lib.AnyObjectId
org.eclipse.jgit.lib.ObjectId
org.eclipse.jgit.lib.ObjectIdOwnerMap.Entry
org.eclipse.jgit.revwalk.RevObject
org.eclipse.jgit.revwalk.RevCommit
org.eclipse.jgit.revplot.PlotCommit<L>
- Type Parameters:
L
- type of lane being used by the plotter.
- All Implemented Interfaces:
Serializable
,Comparable<AnyObjectId>
A commit reference to a commit in the DAG.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) PlotCommit[]
(package private) PlotLane[]
(package private) PlotLane
(package private) PlotLane[]
(package private) static final PlotCommit[]
(package private) static final PlotLane[]
(package private) static final Ref[]
(package private) PlotLane[]
(package private) Ref[]
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) void
(package private) void
private static PlotLane[]
(package private) void
(package private) void
final PlotCommit
getChild
(int nth) Get the nth child from this commit's child list.final int
Get the number of child commits listed in this commit.final L
getLane()
Obtain the lane this commit has been plotted into.final Ref
getRef
(int nth) Get the nth Ref from this commit's ref list.final int
Get the number of refs for this commit.final boolean
Determine if the given commit is a child (descendant) of this commit.void
reset()
Reset this commit to allow another RevWalk with the same instances.Methods inherited from class org.eclipse.jgit.revwalk.RevCommit
carry, disposeBody, getAuthorIdent, getCommitterIdent, getCommitTime, getEncoding, getEncodingName, getFooterLines, getFooterLines, getFooterLines, getFullMessage, getParent, getParentCount, getParents, getRawBuffer, getRawGpgSignature, getShortMessage, getTree, getType, parse, parse, toString
Methods inherited from class org.eclipse.jgit.revwalk.RevObject
add, add, appendCoreFlags, getId, has, hasAll, hasAny, remove, remove
Methods inherited from class org.eclipse.jgit.lib.ObjectId
equals, fromRaw, fromRaw, fromRaw, fromRaw, fromString, fromString, isId, toObjectId, toString, zeroId
-
Field Details
-
Constructor Details
-
PlotCommit
Create a new commit.- Parameters:
id
- the identity of this commit.
-
-
Method Details
-
addForkingOffLane
-
addPassingLane
-
addMergingLane
-
addLane
-
addChild
-
getChildCount
public final int getChildCount()Get the number of child commits listed in this commit.- Returns:
- number of children; always a positive value but can be 0.
-
getChild
Get the nth child from this commit's child list.- Parameters:
nth
- child index to obtain. Must be in the range 0 throughgetChildCount()
-1.- Returns:
- the specified child.
- Throws:
ArrayIndexOutOfBoundsException
- an invalid child index was specified.
-
isChild
Determine if the given commit is a child (descendant) of this commit.- Parameters:
c
- the commit to test.- Returns:
- true if the given commit built on top of this commit.
-
getRefCount
public final int getRefCount()Get the number of refs for this commit.- Returns:
- number of refs; always a positive value but can be 0.
-
getRef
Get the nth Ref from this commit's ref list.- Parameters:
nth
- ref index to obtain. Must be in the range 0 throughgetRefCount()
-1.- Returns:
- the specified ref.
- Throws:
ArrayIndexOutOfBoundsException
- an invalid ref index was specified.
-
getLane
Obtain the lane this commit has been plotted into.- Returns:
- the assigned lane for this commit.
-
reset
public void reset()Reset this commit to allow another RevWalk with the same instances.Subclasses must call
super.reset()
to ensure the basic information can be correctly cleared out.
-