Class SetDiff<E>
java.lang.Object
org.eclipse.core.databinding.observable.set.SetDiff<E>
- Type Parameters:
E
- the type of elements in this diff
- All Implemented Interfaces:
IDiff
Describes the difference between two sets
- Since:
- 1.0
-
Constructor Summary
-
Method Summary
-
Constructor Details
-
SetDiff
public SetDiff()
-
-
Method Details
-
getAdditions
- Returns:
- the set of added elements
-
getRemovals
- Returns:
- the set of removed elements
-
isEmpty
public boolean isEmpty()Returns true if the diff has no added or removed elements.- Returns:
- true if the diff has no added or removed elements.
- Since:
- 1.2
-
applyTo
Applies the changes in this diff to the given set- Parameters:
set
- the set to which the diff will be applied- Since:
- 1.2
-
simulateOn
Returns aSet
showing whatset
would look like if this diff were applied to it. The passed-in list is presumed to contain all elements ingetRemovals()
, and none of the elements ingetAdditions()
.Note:the returned list is only guaranteed to be valid while the passed in set remains unchanged.
- Parameters:
set
- the set over which the diff will be simulated- Returns:
- a
Set
showing whatset
would look like if it were passed to theapplyTo(Set)
method. - Since:
- 1.3
-
toString
-