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

public Class MergeChunk

extends Object
Class Inheritance

One chunk from a merge result. Each chunk contains a range from a single sequence. In case of conflicts multiple chunks are reported for one conflict. The conflictState tells when conflicts start and end.

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static enum
MergeChunk.ConflictState

A state telling whether a MergeChunk belongs to a conflict or not.

Field Summary

Modifier and TypeField and Description
private final int
private final MergeChunk.ConflictState
private final int
private final int

Constructor Summary

AccessConstructor and Description
protected
MergeChunk(int
determines to which sequence this chunks belongs to. Same as in org.eclipse.jgit.merge.MergeResult#add
sequenceIndex
,
int
the first element from the specified sequence which should be included in the merge result. Indexes start with 0.
begin
,
int
specifies the end of the range to be added. The element this index points to is the first element which not added to the merge result. All elements between begin (including begin) and this element are added.
end
,
MergeChunk.ConflictState conflictState)

Creates a new empty MergeChunk

Method Summary

Modifier and TypeMethod and Description
public int

Returns:

the first element from the specified sequence which should be included in the merge result. Indexes start with 0.
getBegin
()

Get the first element from the specified sequence which should be included in the merge result.

public MergeChunk.ConflictState

Returns:

the state of this chunk. See org.eclipse.jgit.merge.MergeChunk.ConflictState
getConflictState
()

Get the state of this chunk.

public int

Returns:

the end of the range of this chunk. The element this index points to is the first element which not added to the merge result. All elements between begin (including begin) and this element are added.
getEnd
()

Get the end of the range of this chunk.

public int

Returns:

the index of the sequence to which this sequence chunks belongs to. Same as in org.eclipse.jgit.merge.MergeResult#add
getSequenceIndex
()

Get the index of the sequence to which this sequence chunks belongs to.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

beginback to summary
private final int begin
conflictStateback to summary
private final MergeChunk.ConflictState conflictState
endback to summary
private final int end
sequenceIndexback to summary
private final int sequenceIndex

Constructor Detail

MergeChunkback to summary
protected MergeChunk(int sequenceIndex, int begin, int end, MergeChunk.ConflictState conflictState)

Creates a new empty MergeChunk

Parameters
sequenceIndex:int

determines to which sequence this chunks belongs to. Same as in org.eclipse.jgit.merge.MergeResult#add

begin:int

the first element from the specified sequence which should be included in the merge result. Indexes start with 0.

end:int

specifies the end of the range to be added. The element this index points to is the first element which not added to the merge result. All elements between begin (including begin) and this element are added.

conflictState:MergeChunk.ConflictState

the state of this chunk. See org.eclipse.jgit.merge.MergeChunk.ConflictState

Method Detail

getBeginback to summary
public int getBegin()

Get the first element from the specified sequence which should be included in the merge result.

Returns:int

the first element from the specified sequence which should be included in the merge result. Indexes start with 0.

getConflictStateback to summary
public MergeChunk.ConflictState getConflictState()

Get the state of this chunk.

Returns:MergeChunk.ConflictState

the state of this chunk. See org.eclipse.jgit.merge.MergeChunk.ConflictState

getEndback to summary
public int getEnd()

Get the end of the range of this chunk.

Returns:int

the end of the range of this chunk. The element this index points to is the first element which not added to the merge result. All elements between begin (including begin) and this element are added.

getSequenceIndexback to summary
public int getSequenceIndex()

Get the index of the sequence to which this sequence chunks belongs to.

Returns:int

the index of the sequence to which this sequence chunks belongs to. Same as in org.eclipse.jgit.merge.MergeResult#add

org.eclipse.jgit.merge back to summary

public final Enum MergeChunk.ConflictState

extends Enum<MergeChunk.ConflictState>
Class Inheritance

A state telling whether a MergeChunk belongs to a conflict or not. The first chunk of a conflict is reported with a special state to be able to distinguish the border between two consecutive conflicts

Field Summary

Modifier and TypeField and Description
public static final MergeChunk.ConflictState
BASE_CONFLICTING_RANGE

This chunk does belong to a conflict and is the base section of the conflicting chunks

public static final MergeChunk.ConflictState
FIRST_CONFLICTING_RANGE

This chunk does belong to a conflict and is the ours section of the conflicting chunks

public static final MergeChunk.ConflictState
NEXT_CONFLICTING_RANGE

This chunk does belong to a conflict and is the theirs section of the conflicting chunks.

public static final MergeChunk.ConflictState
NO_CONFLICT

This chunk does not belong to a conflict

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static MergeChunk.ConflictState
public static MergeChunk.ConflictState[]
Inherited from java.lang.Enum:
clonecompareTodescribeConstableequalsfinalizegetDeclaringClasshashCodenameordinaltoStringvalueOf

Field Detail

BASE_CONFLICTING_RANGEback to summary
public static final MergeChunk.ConflictState BASE_CONFLICTING_RANGE

This chunk does belong to a conflict and is the base section of the conflicting chunks

Since
6.7
FIRST_CONFLICTING_RANGEback to summary
public static final MergeChunk.ConflictState FIRST_CONFLICTING_RANGE

This chunk does belong to a conflict and is the ours section of the conflicting chunks

NEXT_CONFLICTING_RANGEback to summary
public static final MergeChunk.ConflictState NEXT_CONFLICTING_RANGE

This chunk does belong to a conflict and is the theirs section of the conflicting chunks. It's a subsequent one.

NO_CONFLICTback to summary
public static final MergeChunk.ConflictState NO_CONFLICT

This chunk does not belong to a conflict

Constructor Detail

ConflictStateback to summary
private ConflictState()

Method Detail

valueOfback to summary
public static MergeChunk.ConflictState valueOf(String name)
valuesback to summary
public static MergeChunk.ConflictState[] values()