minor API tweaks to use Set and Collection consistently

git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@1893 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
This commit is contained in:
dolby-oss 2007-10-17 15:16:38 +00:00
parent 1e78c51f91
commit 5673fb5ec8
2 changed files with 5 additions and 5 deletions

View File

@ -37,15 +37,15 @@ public class PartialCallGraph extends DelegatingGraph<CGNode> implements CallGra
private final CallGraph cg;
private final Set<CGNode> partialRoots;
private final Collection<CGNode> partialRoots;
private PartialCallGraph(CallGraph cg, Set<CGNode> partialRoots, Graph<CGNode> partialGraph) {
private PartialCallGraph(CallGraph cg, Collection<CGNode> partialRoots, Graph<CGNode> partialGraph) {
super(partialGraph);
this.cg = cg;
this.partialRoots = partialRoots;
}
public static PartialCallGraph make(final CallGraph CG, final Set<CGNode> partialRoots, final Collection<CGNode> nodes) {
public static PartialCallGraph make(final CallGraph CG, final Collection<CGNode> partialRoots, final Collection<CGNode> nodes) {
Graph<CGNode> partialGraph = GraphSlicer.prune(CG, new Filter<CGNode>() {
public boolean accepts(CGNode o) {
return nodes.contains(o);
@ -55,7 +55,7 @@ public class PartialCallGraph extends DelegatingGraph<CGNode> implements CallGra
return new PartialCallGraph(CG, partialRoots, partialGraph);
}
public static PartialCallGraph make(CallGraph CG, Set<CGNode> partialRoots) {
public static PartialCallGraph make(CallGraph CG, Collection<CGNode> partialRoots) {
final Set<CGNode> nodes = DFS.getReachableNodes(CG, partialRoots);
Graph<CGNode> partialGraph = GraphSlicer.prune(CG, new Filter<CGNode>() {
public boolean accepts(CGNode o) {

View File

@ -28,7 +28,7 @@ import com.ibm.wala.util.warnings.WalaException;
*/
public class GraphSlicer {
public static <T> Collection<T> slice(Graph<T> g, Filter<T> f) throws WalaException {
public static <T> Set<T> slice(Graph<T> g, Filter<T> f) throws WalaException {
if (g == null) {
throw new IllegalArgumentException("g is null");