|
Eclipse Platform Release 3.6 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.compare.rangedifferencer.RangeDifference
public class RangeDifference
Description of a change between two or three ranges of comparable entities.
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 outside of the Compare framework.
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
Field Summary | |
---|---|
static int |
ANCESTOR
Three-way change constant indicating the same change in both right and left, that is only the ancestor is different. |
protected int |
ancestorLength
|
protected int |
ancestorStart
|
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. |
protected int |
kind
the kind of change: NOCHANGE, CHANGE, LEFT, RIGHT, ANCESTOR, CONFLICT, ERROR |
static int |
LEFT
Three-way change constant indicating a change in left. |
protected int |
leftLength
|
protected int |
leftStart
|
static int |
NOCHANGE
Two-way change constant indicating no change. |
static int |
RIGHT
Three-way change constant indicating a change in right. |
protected int |
rightLength
|
protected int |
rightStart
|
Constructor Summary | |
---|---|
protected |
RangeDifference(int changeKind)
Creates a new range difference with the given change kind. |
protected |
RangeDifference(int kind,
int rightStart,
int rightLength,
int leftStart,
int leftLength)
Creates a new RangeDifference with the given change kind and
left and right ranges. |
protected |
RangeDifference(int kind,
int rightStart,
int rightLength,
int leftStart,
int leftLength,
int ancestorStart,
int ancestorLength)
Creates a new RangeDifference with the given change kind and
left, right, and ancestor ranges. |
Method Summary | |
---|---|
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. |
boolean |
equals(Object obj)
|
int |
hashCode()
|
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. |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
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
protected int kind
protected int leftStart
protected int leftLength
protected int rightStart
protected int rightLength
protected int ancestorStart
protected int ancestorLength
Constructor Detail |
---|
protected RangeDifference(int changeKind)
changeKind
- the kind of changeprotected RangeDifference(int kind, int rightStart, int rightLength, int leftStart, int leftLength)
RangeDifference
with the given change kind and
left and right ranges.
kind
- the kind of changerightStart
- start index of entity on right siderightLength
- number of entities on right sideleftStart
- start index of entity on left sideleftLength
- number of entities on left sideprotected RangeDifference(int kind, int rightStart, int rightLength, int leftStart, int leftLength, int ancestorStart, int ancestorLength)
RangeDifference
with the given change kind and
left, right, and ancestor ranges.
kind
- the kind of changerightStart
- start index of entity on right siderightLength
- number of entities on right sideleftStart
- start index of entity on left sideleftLength
- number of entities on left sideancestorStart
- start index of entity on ancestor sideancestorLength
- number of entities on ancestor sideMethod Detail |
---|
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()
public boolean equals(Object obj)
equals
in class Object
public int hashCode()
hashCode
in class Object
public String toString()
toString
in class Object
|
Eclipse Platform Release 3.6 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Guidelines for using Eclipse APIs.
Copyright (c) Eclipse contributors and others 2000, 2010. All rights reserved.