Interface DiffHunk.Builder
- All Superinterfaces:
Buildable,CopyableBuilder<DiffHunk.Builder,,DiffHunk> SdkBuilder<DiffHunk.Builder,,DiffHunk> SdkPojo
- Enclosing class:
DiffHunk
-
Method Summary
Modifier and TypeMethodDescriptionafterLineCount(Integer afterLineCount) The number of lines from the after blob covered by this hunk, including any context lines.afterStartLine(Integer afterStartLine) The 1-based line number in the after blob where this hunk begins.beforeLineCount(Integer beforeLineCount) The number of lines from the before blob covered by this hunk, including any context lines.beforeStartLine(Integer beforeStartLine) The 1-based line number in the before blob where this hunk begins.changes(Collection<DiffChange> changes) An ordered list of line-level changes that make up this hunk.changes(Consumer<DiffChange.Builder>... changes) An ordered list of line-level changes that make up this hunk.changes(DiffChange... changes) An ordered list of line-level changes that make up this hunk.Methods inherited from interface software.amazon.awssdk.utils.builder.CopyableBuilder
copyMethods inherited from interface software.amazon.awssdk.utils.builder.SdkBuilder
applyMutation, buildMethods inherited from interface software.amazon.awssdk.core.SdkPojo
equalsBySdkFields, sdkFieldNameToField, sdkFields
-
Method Details
-
beforeStartLine
The 1-based line number in the before blob where this hunk begins. When the hunk consists entirely of additions,
beforeLineCountis0.- Parameters:
beforeStartLine- The 1-based line number in the before blob where this hunk begins. When the hunk consists entirely of additions,beforeLineCountis0.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
beforeLineCount
The number of lines from the before blob covered by this hunk, including any context lines.
- Parameters:
beforeLineCount- The number of lines from the before blob covered by this hunk, including any context lines.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
afterStartLine
The 1-based line number in the after blob where this hunk begins. When the hunk consists entirely of deletions,
afterLineCountis0.- Parameters:
afterStartLine- The 1-based line number in the after blob where this hunk begins. When the hunk consists entirely of deletions,afterLineCountis0.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
afterLineCount
The number of lines from the after blob covered by this hunk, including any context lines.
- Parameters:
afterLineCount- The number of lines from the after blob covered by this hunk, including any context lines.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
changes
An ordered list of line-level changes that make up this hunk. Each entry indicates whether the line is unchanged context, an addition, or a deletion.
- Parameters:
changes- An ordered list of line-level changes that make up this hunk. Each entry indicates whether the line is unchanged context, an addition, or a deletion.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
changes
An ordered list of line-level changes that make up this hunk. Each entry indicates whether the line is unchanged context, an addition, or a deletion.
- Parameters:
changes- An ordered list of line-level changes that make up this hunk. Each entry indicates whether the line is unchanged context, an addition, or a deletion.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
changes
An ordered list of line-level changes that make up this hunk. Each entry indicates whether the line is unchanged context, an addition, or a deletion.
This is a convenience method that creates an instance of theDiffChange.Builderavoiding the need to create one manually viaDiffChange.builder().When the
Consumercompletes,SdkBuilder.build()is called immediately and its result is passed tochanges(List<DiffChange>).- Parameters:
changes- a consumer that will call methods onDiffChange.Builder- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-