public class ReordersDetector.Pair
extends java.lang.Object
Constructor and Description |
---|
Pair(int source,
int destination) |
Modifier and Type | Method and Description |
---|---|
boolean |
doIntersect(ReordersDetector.Pair pair)
this method will check if this Pair intersect with the passed Pair
|
int |
getDestIndex()
accessor for the desination index
|
int |
getDistance()
return the Pair distance which represents the length of the reorder
operation if the distance is < 0 then this is not a valid pair
|
int |
getSourceIndex()
accessor for the source index
|
boolean |
isValid()
check if the pair is valid or not, invalide pair is any pair that has
a negative distance or if onw of its indexs is negative
|
java.lang.String |
toString() |
public int getDistance()
public boolean isValid()
public java.lang.String toString()
toString
in class java.lang.Object
public boolean doIntersect(ReordersDetector.Pair pair)
pair
- public int getDestIndex()
public int getSourceIndex()