public class Diffs extends Object
Constructor and Description |
---|
Diffs() |
Modifier and Type | Method and Description |
---|---|
static ListDiff |
computeLazyListDiff(List oldList,
List newList)
Returns a lazily computed
ListDiff describing the change between
the specified old and new list states. |
static MapDiff |
computeLazyMapDiff(Map oldMap,
Map newMap)
Returns a lazily computed
MapDiff describing the change between
the specified old and new map states. |
static SetDiff |
computeLazySetDiff(Set oldSet,
Set newSet)
Returns a lazily computed
SetDiff describing the change between
the specified old and new set states. |
static ListDiff |
computeListDiff(List oldList,
List newList)
Returns a
ListDiff describing the change between the specified
old and new list states. |
static MapDiff |
computeMapDiff(Map oldMap,
Map newMap)
Returns a
MapDiff describing the change between the specified old
and new map states. |
static SetDiff |
computeSetDiff(Set oldSet,
Set newSet)
Returns a
SetDiff describing the change between the specified old
and new set states. |
static ListDiff |
createListDiff(ListDiffEntry difference) |
static ListDiff |
createListDiff(ListDiffEntry[] differences) |
static ListDiff |
createListDiff(ListDiffEntry difference1,
ListDiffEntry difference2) |
static ListDiffEntry |
createListDiffEntry(int position,
boolean isAddition,
Object element) |
static MapDiff |
createMapDiff(Set addedKeys,
Set removedKeys,
Set changedKeys,
Map oldValues,
Map newValues) |
static MapDiff |
createMapDiffRemoveAll(Map copyOfOldMap) |
static MapDiff |
createMapDiffSingleAdd(Object addedKey,
Object newValue) |
static MapDiff |
createMapDiffSingleChange(Object existingKey,
Object oldValue,
Object newValue) |
static MapDiff |
createMapDiffSingleRemove(Object removedKey,
Object oldValue) |
static SetDiff |
createSetDiff(Set additions,
Set removals) |
static ValueDiff |
createValueDiff(Object oldValue,
Object newValue) |
static boolean |
equals(Object left,
Object right)
Checks whether the two objects are
null -- allowing for
null . |
public static ListDiff computeListDiff(List oldList, List newList)
ListDiff
describing the change between the specified
old and new list states.oldList
- the old list statenewList
- the new list statepublic static ListDiff computeLazyListDiff(List oldList, List newList)
ListDiff
describing the change between
the specified old and new list states.oldList
- the old list statenewList
- the new list stateListDiff
describing the change between
the specified old and new list states.public static final boolean equals(Object left, Object right)
null
-- allowing for
null
.left
- The left object to compare; may be null
.right
- The right object to compare; may be null
.true
if the two objects are equivalent;
false
otherwise.public static SetDiff computeSetDiff(Set oldSet, Set newSet)
SetDiff
describing the change between the specified old
and new set states.oldSet
- the old set statenewSet
- the new set stateSetDiff
describing the change between the specified old
and new set states.public static SetDiff computeLazySetDiff(Set oldSet, Set newSet)
SetDiff
describing the change between
the specified old and new set states.oldSet
- the old set statenewSet
- the new set stateSetDiff
describing the change between
the specified old and new set states.public static MapDiff computeMapDiff(Map oldMap, Map newMap)
MapDiff
describing the change between the specified old
and new map states.oldMap
- the old map statenewMap
- the new map stateMapDiff
describing the change between the specified old
and new map states.public static MapDiff computeLazyMapDiff(Map oldMap, Map newMap)
MapDiff
describing the change between
the specified old and new map states.oldMap
- the old map statenewMap
- the new map stateMapDiff
describing the change between
the specified old and new map states.public static ValueDiff createValueDiff(Object oldValue, Object newValue)
oldValue
- newValue
- public static SetDiff createSetDiff(Set additions, Set removals)
additions
- removals
- public static ListDiff createListDiff(ListDiffEntry difference)
difference
- public static ListDiff createListDiff(ListDiffEntry difference1, ListDiffEntry difference2)
difference1
- difference2
- public static ListDiff createListDiff(ListDiffEntry[] differences)
differences
- public static ListDiffEntry createListDiffEntry(int position, boolean isAddition, Object element)
position
- isAddition
- element
- public static MapDiff createMapDiffSingleAdd(Object addedKey, Object newValue)
addedKey
- newValue
- public static MapDiff createMapDiffSingleChange(Object existingKey, Object oldValue, Object newValue)
existingKey
- oldValue
- newValue
- public static MapDiff createMapDiffSingleRemove(Object removedKey, Object oldValue)
removedKey
- oldValue
- public static MapDiff createMapDiffRemoveAll(Map copyOfOldMap)
copyOfOldMap
-
Copyright (c) 2000, 2015 Eclipse Contributors and others. All rights reserved.Guidelines for using Eclipse APIs.