Constructor and Description |
---|
SetDiff() |
Modifier and Type | Method and Description |
---|---|
void |
applyTo(Set<E> set)
Applies the changes in this diff to the given set
|
abstract 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 a
Set showing what set would look like if
this diff were applied to it. |
String |
toString() |
public boolean isEmpty()
public void applyTo(Set<E> set)
set
- the set to which the diff will be appliedpublic Set<E> simulateOn(Set<E> set)
Set
showing what set
would look like if
this diff were applied to it. The passed-in list is presumed to contain
all elements in getRemovals()
, and none of the elements in
getAdditions()
.
Note:the returned list is only guaranteed to be valid while the passed in set remains unchanged.
set
- the set over which the diff will be simulatedSet
showing what set
would look like if it
were passed to the applyTo(Set)
method.public String toString()
toString
in class Object
Object.toString()
Copyright (c) 2000, 2016 Eclipse Contributors and others. All rights reserved.Guidelines for using Eclipse APIs.