Constructor and Description |
---|
SetDiff() |
Modifier and Type | Method and Description |
---|---|
void |
applyTo(Set set)
Applies the changes in this diff to the given set
|
abstract Set |
getAdditions() |
abstract Set |
getRemovals() |
boolean |
isEmpty()
Returns true if the diff has no added or removed elements.
|
Set |
simulateOn(Set set)
Returns a
Set showing what set would look like if
this diff were applied to it. |
String |
toString() |
public abstract Set getAdditions()
public abstract Set getRemovals()
public boolean isEmpty()
public void applyTo(Set set)
set
- the set to which the diff will be appliedpublic Set simulateOn(Set 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, 2014 Eclipse Contributors and others. All rights reserved.Guidelines for using Eclipse APIs.