public class Hunk
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static int |
CHANGED
type indicates a changed block
|
static int |
DELETED
type indicates a deleted block
|
static int |
INSERTED
type indicates an inserted block
|
Range |
left
the range in the left document
|
Range |
right
the rnage in the right document
|
int |
type
the hunk type
|
static int |
UNMODIFIED
type indicates an unmodified block
|
Constructor and Description |
---|
Hunk(Range left,
Range right,
int type,
Hunk prev)
Creates a new hunk and adds it to the previous hunk
|
Modifier and Type | Method and Description |
---|---|
Hunk |
next()
Returns the next hunk of this chain
|
Hunk |
prev()
Returns the previous hunk of this chain
|
Hunk |
write(DiffWriter out,
int numContextLines)
Writes a unified diff to the given writer and returns the next hunk to
continue the output.
|
public static final int UNMODIFIED
public static final int INSERTED
public static final int DELETED
public static final int CHANGED
public final Range left
public final Range right
public final int type
public Hunk prev()
public Hunk next()
public Hunk write(DiffWriter out, int numContextLines) throws java.io.IOException
out
- the writernumContextLines
- the number of context lines to include in the
diff blocks. do not change during iteration!null
.java.io.IOException
- if an I/O error occurs."Copyright © 2010 - 2020 Adobe Systems Incorporated. All Rights Reserved"