public class RangeDifference extends Object
RangeDifference
objects are the elements of a compare result returned from
the RangeDifferencer
find*
methods.
Clients use these objects as they are returned from the differencer.
This class is not intended to be instantiated or subclassed.
Note: A range in the RangeDifference
object is given as a start index
and length in terms of comparable entities. However, these entity indices and counts
are not necessarily character positions. For example, if an entity represents a line
in a document, the start index would be a line number and the count would be in lines.
RangeDifferencer
Modifier and Type | Field and Description |
---|---|
static int |
ANCESTOR
Three-way change constant indicating the same change in both right and left,
that is only the ancestor is different.
|
static int |
CHANGE
Two-way change constant indicating two-way change (same as
RIGHT ) |
static int |
CONFLICT
Three-way change constant indicating a change in both right and left.
|
static int |
ERROR
Constant indicating an unknown change kind.
|
static int |
LEFT
Three-way change constant indicating a change in left.
|
static int |
NOCHANGE
Two-way change constant indicating no change.
|
static int |
RIGHT
Three-way change constant indicating a change in right.
|
Modifier and Type | Method and Description |
---|---|
int |
ancestorEnd()
Returns the end index of the entity range on the ancestor side.
|
int |
ancestorLength()
Returns the number of entities on the ancestor side.
|
int |
ancestorStart()
Returns the start index of the entity range on the ancestor side.
|
int |
kind()
Returns the kind of difference.
|
int |
leftEnd()
Returns the end index of the entity range on the left side.
|
int |
leftLength()
Returns the number of entities on the left side.
|
int |
leftStart()
Returns the start index of the entity range on the left side.
|
int |
maxLength()
Returns the maximum number of entities in the left, right, and ancestor sides of this range.
|
int |
rightEnd()
Returns the end index of the entity range on the right side.
|
int |
rightLength()
Returns the number of entities on the right side.
|
int |
rightStart()
Returns the start index of the entity range on the right side.
|
public static final int NOCHANGE
public static final int CHANGE
RIGHT
)public static final int CONFLICT
public static final int RIGHT
public static final int LEFT
public static final int ANCESTOR
public static final int ERROR
public int kind()
NOCHANGE
, CHANGE
, LEFT
, RIGHT
,
ANCESTOR
, CONFLICT
, ERROR
public int ancestorStart()
public int ancestorLength()
public int ancestorEnd()
public int rightStart()
public int rightLength()
public int rightEnd()
public int leftStart()
public int leftLength()
public int leftEnd()
public int maxLength()
Guidelines for using Eclipse APIs. Copyright (c) IBM Corp. and others 2000, 2006. All rights reserved.