Class SetDiff<E>
- java.lang.Object
-
- org.eclipse.core.databinding.observable.set.SetDiff<E>
-
-
Constructor Summary
Constructors Constructor Description SetDiff()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description void
applyTo(Set<? super E> set)
Applies the changes in this diff to the given setabstract Set<E>
getAdditions()
abstract Set<E>
getRemovals()
boolean
isEmpty()
Returns true if the diff has no added or removed elements.Set<E>
simulateOn(Set<E> set)
Returns aSet
showing whatset
would look like if this diff were applied to it.String
toString()
-
-
-
Method Detail
-
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
public void applyTo(Set<? super E> set)
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
public Set<E> simulateOn(Set<E> set)
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
-
-