org.eclipse.core.databinding.observable
Class Diffs
java.lang.Object
org.eclipse.core.databinding.observable.Diffs
-
public class Diffs
- extends
Object
-
Since:
- 1.0
|
Constructor Summary
|
Diffs
()
|
|
Method Summary
|
static
ListDiff
|
computeListDiff
(
List oldList,
List newList)
|
static
MapDiff
|
computeMapDiff
(
Map oldMap,
Map newMap)
Computes the difference between two maps. |
static
SetDiff
|
computeSetDiff
(
Set oldSet,
Set newSet)
|
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. |
|
Methods inherited from class java.lang.
Object
|
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait
|
Diffs
public Diffs()
computeListDiff
public static
ListDiff computeListDiff(
List oldList,
List newList)
-
-
Parameters:
-
oldList - -
newList -
-
Returns:
- the differences between oldList and newList
equals
public static final boolean equals(
Object left,
Object right)
- Checks whether the two objects are
null -- allowing for
null.
-
-
Parameters:
-
left - The left object to compare; may be null. -
right - The right object to compare; may be null.
-
Returns:
-
true if the two objects are equivalent;
false otherwise.
computeSetDiff
public static
SetDiff computeSetDiff(
Set oldSet,
Set newSet)
-
-
Parameters:
-
oldSet - -
newSet -
-
Returns:
- a set diff
computeMapDiff
public static
MapDiff computeMapDiff(
Map oldMap,
Map newMap)
- Computes the difference between two maps.
-
-
Parameters:
-
oldMap - -
newMap -
-
Returns:
- a map diff representing the changes needed to turn oldMap into
newMap
createValueDiff
public static
ValueDiff createValueDiff(
Object oldValue,
Object newValue)
-
-
Parameters:
-
oldValue - -
newValue -
-
Returns:
- a value diff
createSetDiff
public static
SetDiff createSetDiff(
Set additions,
Set removals)
-
-
Parameters:
-
additions - -
removals -
-
Returns:
- a set diff
createListDiff
public static
ListDiff createListDiff(
ListDiffEntry difference)
-
-
Parameters:
-
difference -
-
Returns:
- a list diff with one differing entry
createListDiff
public static
ListDiff createListDiff(
ListDiffEntry difference1,
ListDiffEntry difference2)
-
-
Parameters:
-
difference1 - -
difference2 -
-
Returns:
- a list diff with two differing entries
createListDiff
public static
ListDiff createListDiff(
ListDiffEntry[] differences)
-
-
Parameters:
-
differences -
-
Returns:
- a list diff with the given entries
createListDiffEntry
public static
ListDiffEntry createListDiffEntry(int position,
boolean isAddition,
Object element)
-
-
Parameters:
-
position - -
isAddition - -
element -
-
Returns:
- a list diff entry
createMapDiffSingleAdd
public static
MapDiff createMapDiffSingleAdd(
Object addedKey,
Object newValue)
-
-
Parameters:
-
addedKey - -
newValue -
-
Returns:
- a map diff
createMapDiffSingleChange
public static
MapDiff createMapDiffSingleChange(
Object existingKey,
Object oldValue,
Object newValue)
-
-
Parameters:
-
existingKey - -
oldValue - -
newValue -
-
Returns:
- a map diff
createMapDiffSingleRemove
public static
MapDiff createMapDiffSingleRemove(
Object removedKey,
Object oldValue)
-
-
Parameters:
-
removedKey - -
oldValue -
-
Returns:
- a map diff
createMapDiffRemoveAll
public static
MapDiff createMapDiffRemoveAll(
Map copyOfOldMap)
-
-
Parameters:
-
copyOfOldMap -
-
Returns:
- a map diff
createMapDiff
public static
MapDiff createMapDiff(
Set addedKeys,
Set removedKeys,
Set changedKeys,
Map oldValues,
Map newValues)
-
-
Parameters:
-
addedKeys - -
removedKeys - -
changedKeys - -
oldValues - -
newValues -
-
Returns:
- a map diff
Guidelines for using Eclipse APIs.
Copyright (c) Eclipse contributors and others 2000, 2008. All rights reserved.