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 voidapplyTo(java.util.Set<? super E> set)Applies the changes in this diff to the given setabstract java.util.Set<E>getAdditions()abstract java.util.Set<E>getRemovals()booleanisEmpty()Returns true if the diff has no added or removed elements.java.util.Set<E>simulateOn(java.util.Set<E> set)Returns aSetshowing whatsetwould look like if this diff were applied to it.java.lang.StringtoString()
-
-
-
Method Detail
-
getAdditions
public abstract java.util.Set<E> getAdditions()
- Returns:
- the set of added elements
-
getRemovals
public abstract java.util.Set<E> 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
public void applyTo(java.util.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 java.util.Set<E> simulateOn(java.util.Set<E> set)
Returns aSetshowing whatsetwould 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
Setshowing whatsetwould look like if it were passed to theapplyTo(Set)method. - Since:
- 1.3
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-