public final class ArrayDiff extends Object
Note the current implementation is unoptimized and fairly brute force.
Modifier and Type | Method and Description |
---|---|
static ArrayDiff |
createDiff(TabData[] old,
TabData[] nue)
Returns an ArrayDiff object if the two arrays are not the same, or null
if they are
|
boolean |
equals(Object o) |
Set<Integer> |
getAddedIndices()
Returns the indices of objects in the new array which are not present in
the old array
|
Set<Integer> |
getChangedIndices()
Returns the indices of objects which differ in any way between the new
and old array.
|
Set<Integer> |
getDeletedIndices()
Returns the indices of objects in the old array which are not present in
the new array.
|
Set<Integer> |
getMovedIndices()
Returns the indices of objects which were in the old array and are also
in the new array, but at a different index.
|
TabData[] |
getNewData()
Get the array representing the new state
|
TabData[] |
getOldData()
Get the array representing the old state
|
int |
hashCode() |
String |
toString() |
public TabData[] getOldData()
public TabData[] getNewData()
public static ArrayDiff createDiff(TabData[] old, TabData[] nue)
public Set<Integer> getDeletedIndices()
public Set<Integer> getAddedIndices()
public Set<Integer> getChangedIndices()
public Set<Integer> getMovedIndices()