Top Description Fields Constructors Methods
org.eclipse.jgit.revplot

public Class PlotCommit<L extends PlotLane>

extends RevCommit
Class Inheritance
Type Parameters
<L>
type of lane being used by the plotter.
Imports
org.eclipse.jgit.lib.AnyObjectId, .Ref, org.eclipse.jgit.revwalk.RevCommit

A commit reference to a commit in the DAG.
See Also
PlotCommitList

Field Summary

Modifier and TypeField and Description
pack-priv PlotCommit<L extends PlotLane>[]
pack-priv PlotLane[]
pack-priv PlotLane
pack-priv PlotLane[]
pack-priv static final PlotCommit<L extends PlotLane>[]
pack-priv static final PlotLane[]
pack-priv static final Ref[]
pack-priv PlotLane[]
pack-priv Ref[]
Inherited from org.eclipse.jgit.revwalk.RevCommit:
bufferparentstree

Constructor Summary

AccessConstructor and Description
protected
PlotCommit(AnyObjectId
the identity of this commit.
id
)

Create a new commit.

Method Summary

Modifier and TypeMethod and Description
pack-priv void
pack-priv void
private static PlotLane[]
pack-priv void
pack-priv void
public final PlotCommit<L extends PlotLane>

Returns:

the specified child.
getChild
(int
child index to obtain. Must be in the range 0 through getChildCount()-1.
nth
)

Get the nth child from this commit's child list.

public final int

Returns:

number of children; always a positive value but can be 0.
getChildCount
()

Get the number of child commits listed in this commit.

public final L

Returns:

the assigned lane for this commit.
getLane
()

Obtain the lane this commit has been plotted into.

public final Ref

Returns:

the specified ref.
getRef
(int
ref index to obtain. Must be in the range 0 through getRefCount()-1.
nth
)

Get the nth Ref from this commit's ref list.

public final int

Returns:

number of refs; always a positive value but can be 0.
getRefCount
()

Get the number of refs for this commit.

public final boolean

Returns:

true if the given commit built on top of this commit.
isChild
(PlotCommit<L extends PlotLane>
the commit to test.
c
)

Determine if the given commit is a child (descendant) of this commit.

public void
reset()

Overrides org.eclipse.jgit.revwalk.RevCommit.reset.

Reset this commit to allow another RevWalk with the same instances.

Inherited from org.eclipse.jgit.revwalk.RevCommit:
carrydisposeBodygetAuthorIdentgetChangedPathFiltergetCommitterIdentgetCommitTimegetEncodinggetEncodingNamegetFirstMessageLinegetFooterLinesgetFooterLinesgetFooterLinesgetFullMessagegetParentgetParentCountgetParentsgetRawBuffergetRawGpgSignaturegetShortMessagegetTreegetTypeparseparsetoString

Field Detail

childrenback to summary
pack-priv PlotCommit<L extends PlotLane>[] children
forkingOffLanesback to summary
pack-priv PlotLane[] forkingOffLanes
laneback to summary
pack-priv PlotLane lane
mergingLanesback to summary
pack-priv PlotLane[] mergingLanes
NO_CHILDRENback to summary
pack-priv static final PlotCommit<L extends PlotLane>[] NO_CHILDREN
NO_LANESback to summary
pack-priv static final PlotLane[] NO_LANES
NO_REFSback to summary
pack-priv static final Ref[] NO_REFS
passingLanesback to summary
pack-priv PlotLane[] passingLanes
refsback to summary
pack-priv Ref[] refs

Constructor Detail

PlotCommitback to summary
protected PlotCommit(AnyObjectId id)

Create a new commit.

Parameters
id:AnyObjectId

the identity of this commit.

Method Detail

addChildback to summary
pack-priv void addChild(PlotCommit<L extends PlotLane> c)
addForkingOffLaneback to summary
pack-priv void addForkingOffLane(PlotLane f)
addLaneback to summary
private static PlotLane[] addLane(PlotLane l, PlotLane[] lanes)
addMergingLaneback to summary
pack-priv void addMergingLane(PlotLane m)
addPassingLaneback to summary
pack-priv void addPassingLane(PlotLane c)
getChildback to summary
public final PlotCommit<L extends PlotLane> getChild(int nth)

Get the nth child from this commit's child list.

Parameters
nth:int

child index to obtain. Must be in the range 0 through getChildCount()-1.

Returns:PlotCommit<L extends PlotLane>

the specified child.

Exceptions
ArrayIndexOutOfBoundsException:
an invalid child index was specified.
getChildCountback to summary
public final int getChildCount()

Get the number of child commits listed in this commit.

Returns:int

number of children; always a positive value but can be 0.

getLaneback to summary
public final L getLane()

Obtain the lane this commit has been plotted into.

Returns:L

the assigned lane for this commit.

Annotations
@SuppressWarnings:unchecked
getRefback to summary
public final Ref getRef(int nth)

Get the nth Ref from this commit's ref list.

Parameters
nth:int

ref index to obtain. Must be in the range 0 through getRefCount()-1.

Returns:Ref

the specified ref.

Exceptions
ArrayIndexOutOfBoundsException:
an invalid ref index was specified.
getRefCountback to summary
public final int getRefCount()

Get the number of refs for this commit.

Returns:int

number of refs; always a positive value but can be 0.

isChildback to summary
public final boolean isChild(PlotCommit<L extends PlotLane> c)

Determine if the given commit is a child (descendant) of this commit.

Parameters
c:PlotCommit<L extends PlotLane>

the commit to test.

Returns:boolean

true if the given commit built on top of this commit.

Annotations
@SuppressWarnings:ReferenceEquality
resetback to summary
public void reset()

Overrides org.eclipse.jgit.revwalk.RevCommit.reset.

Doc from org.eclipse.jgit.revwalk.RevCommit.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.

Annotations
@Override