fix generic types on EdgeManager.getPredNodes and getSuccNodes. finally.
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@3707 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
This commit is contained in:
parent
fad698bcb6
commit
a26c27be44
|
@ -146,7 +146,7 @@ public class BasicHeapGraph extends HeapGraph {
|
|||
return pred.getRelatedCount(n);
|
||||
}
|
||||
|
||||
public Iterator<? extends Object> getSuccNodes(Object N) {
|
||||
public Iterator<Object> getSuccNodes(Object N) {
|
||||
int[] succ = computeSuccNodeNumbers(N, nodeMgr);
|
||||
if (succ == null) {
|
||||
return EmptyIterator.instance();
|
||||
|
@ -381,7 +381,7 @@ public class BasicHeapGraph extends HeapGraph {
|
|||
/*
|
||||
* @see com.ibm.wala.util.graph.EdgeManager#getPredNodes(com.ibm.wala.util.graph.Node)
|
||||
*/
|
||||
public Iterator<? extends Object> getPredNodes(Object N) {
|
||||
public Iterator<Object> getPredNodes(Object N) {
|
||||
return G.getPredNodes(N);
|
||||
}
|
||||
|
||||
|
@ -395,7 +395,7 @@ public class BasicHeapGraph extends HeapGraph {
|
|||
/*
|
||||
* @see com.ibm.wala.util.graph.EdgeManager#getSuccNodes(com.ibm.wala.util.graph.Node)
|
||||
*/
|
||||
public Iterator<? extends Object> getSuccNodes(Object N) {
|
||||
public Iterator<Object> getSuccNodes(Object N) {
|
||||
return G.getSuccNodes(N);
|
||||
}
|
||||
|
||||
|
|
|
@ -185,7 +185,7 @@ public class BackwardsSupergraph<T, P> implements ISupergraph<T, P> {
|
|||
/*
|
||||
* @see com.ibm.wala.util.graph.EdgeManager#getPredNodes(java.lang.Object)
|
||||
*/
|
||||
public Iterator<? extends T> getPredNodes(T N) {
|
||||
public Iterator<T> getPredNodes(T N) {
|
||||
return delegate.getSuccNodes(N);
|
||||
}
|
||||
|
||||
|
@ -199,7 +199,7 @@ public class BackwardsSupergraph<T, P> implements ISupergraph<T, P> {
|
|||
/*
|
||||
* @see com.ibm.wala.util.graph.EdgeManager#getSuccNodes(java.lang.Object)
|
||||
*/
|
||||
public Iterator<? extends T> getSuccNodes(T N) {
|
||||
public Iterator<T> getSuccNodes(T N) {
|
||||
return delegate.getPredNodes(N);
|
||||
}
|
||||
|
||||
|
|
|
@ -225,7 +225,7 @@ public class SimpleDemandPointerFlowGraph extends SlowSparseNumberedGraph<Object
|
|||
* @see com.ibm.capa.util.graph.AbstractGraph#getPredNodes(java.lang.Object)
|
||||
*/
|
||||
@Override
|
||||
public Iterator<? extends Object> getPredNodes(Object N) throws IllegalArgumentException {
|
||||
public Iterator<Object> getPredNodes(Object N) throws IllegalArgumentException {
|
||||
if (N instanceof com.ibm.wala.ipa.callgraph.propagation.StaticFieldKey) {
|
||||
throw new IllegalArgumentException("N instanceof com.ibm.wala.ipa.callgraph.propagation.StaticFieldKey");
|
||||
}
|
||||
|
@ -246,12 +246,10 @@ public class SimpleDemandPointerFlowGraph extends SlowSparseNumberedGraph<Object
|
|||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see com.ibm.capa.util.graph.AbstractGraph#getSuccNodes(java.lang.Object)
|
||||
*/
|
||||
@Override
|
||||
public Iterator<? extends Object> getSuccNodes(Object N) {
|
||||
public Iterator<Object> getSuccNodes(Object N) {
|
||||
if (N instanceof StaticFieldKey) {
|
||||
addNodesThatWriteToStaticField(((StaticFieldKey) N).getField());
|
||||
} else {
|
||||
|
|
|
@ -10,9 +10,11 @@
|
|||
*******************************************************************************/
|
||||
package com.ibm.wala.ipa.callgraph.propagation;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.HashSet;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import com.ibm.wala.fixedpoint.impl.AbstractOperator;
|
||||
|
@ -504,16 +506,15 @@ public class PropagationGraph implements IFixedPointSystem<PointsToSetVariable>
|
|||
public Iterator<PointsToSetVariable> getPredNodes(PointsToSetVariable v) {
|
||||
final Iterator eqs = getStatementsThatDef(v);
|
||||
return new Iterator<PointsToSetVariable>() {
|
||||
Iterator<PointsToSetVariable> inner;
|
||||
Iterator<INodeWithNumber> inner;
|
||||
|
||||
public boolean hasNext() {
|
||||
return eqs.hasNext() || (inner != null);
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
public PointsToSetVariable next() {
|
||||
if (inner != null) {
|
||||
PointsToSetVariable result = inner.next();
|
||||
PointsToSetVariable result = (PointsToSetVariable)inner.next();
|
||||
if (!inner.hasNext()) {
|
||||
inner = null;
|
||||
}
|
||||
|
@ -523,7 +524,7 @@ public class PropagationGraph implements IFixedPointSystem<PointsToSetVariable>
|
|||
if (useImplicitRepresentation(eq)) {
|
||||
return (PointsToSetVariable) ((UnaryStatement) eq).getRightHandSide();
|
||||
} else {
|
||||
inner = (Iterator<PointsToSetVariable>) delegateGraph.getPredNodes(eq);
|
||||
inner = delegateGraph.getPredNodes(eq);
|
||||
return next();
|
||||
}
|
||||
}
|
||||
|
@ -653,16 +654,20 @@ public class PropagationGraph implements IFixedPointSystem<PointsToSetVariable>
|
|||
if (number == -1) {
|
||||
return EmptyIterator.instance();
|
||||
}
|
||||
Iterator<AbstractStatement> result = (Iterator<AbstractStatement>) delegateGraph.getSuccNodes(v);
|
||||
Iterator<INodeWithNumber> result = delegateGraph.getSuccNodes(v);
|
||||
for (int i = 0; i < invImplicitUnaryMap.size(); i++) {
|
||||
UnaryOperator op = invImplicitUnaryMap.getKey(i);
|
||||
IBinaryNaturalRelation R = (IBinaryNaturalRelation) invImplicitUnaryMap.getValue(i);
|
||||
IntSet s = R.getRelated(number);
|
||||
if (s != null) {
|
||||
result = new CompoundIterator<AbstractStatement>(new ImplicitUseIterator(op, v, s), result);
|
||||
result = new CompoundIterator<INodeWithNumber>(new ImplicitUseIterator(op, v, s), result);
|
||||
}
|
||||
}
|
||||
return result;
|
||||
List<AbstractStatement> list = new ArrayList<AbstractStatement>();
|
||||
while (result.hasNext()) {
|
||||
list.add((AbstractStatement) result.next());
|
||||
}
|
||||
return list.iterator();
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
|
@ -674,17 +679,21 @@ public class PropagationGraph implements IFixedPointSystem<PointsToSetVariable>
|
|||
if (number == -1) {
|
||||
return EmptyIterator.instance();
|
||||
}
|
||||
Iterator<AbstractStatement> result = (Iterator<AbstractStatement>) delegateGraph.getPredNodes(v);
|
||||
Iterator<INodeWithNumber> result = delegateGraph.getPredNodes(v);
|
||||
for (int i = 0; i < implicitUnaryMap.size(); i++) {
|
||||
UnaryOperator op = implicitUnaryMap.getKey(i);
|
||||
IBinaryNaturalRelation R = (IBinaryNaturalRelation) implicitUnaryMap.getValue(i);
|
||||
IntSet s = R.getRelated(number);
|
||||
if (s != null) {
|
||||
result = new CompoundIterator<AbstractStatement>(new ImplicitDefIterator(op, s, v), result);
|
||||
result = new CompoundIterator<INodeWithNumber>(new ImplicitDefIterator(op, s, v), result);
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
List<AbstractStatement> list = new ArrayList<AbstractStatement>();
|
||||
while (result.hasNext()) {
|
||||
list.add((AbstractStatement) result.next());
|
||||
}
|
||||
return list.iterator();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -919,7 +928,7 @@ public class PropagationGraph implements IFixedPointSystem<PointsToSetVariable>
|
|||
* @see com.ibm.wala.util.graph.EdgeManager#getPredNodes(java.lang.Object)
|
||||
*/
|
||||
@Override
|
||||
public Iterator<? extends PointsToSetVariable> getPredNodes(PointsToSetVariable v) {
|
||||
public Iterator<PointsToSetVariable> getPredNodes(PointsToSetVariable v) {
|
||||
final Iterator eqs = getStatementsThatDef(v);
|
||||
return new Iterator<PointsToSetVariable>() {
|
||||
PointsToSetVariable nextResult;
|
||||
|
|
|
@ -551,7 +551,7 @@ public abstract class AbstractInterproceduralCFG<T extends ISSABasicBlock> imple
|
|||
/*
|
||||
* @see com.ibm.wala.util.graph.EdgeManager#getPredNodes(com.ibm.wala.util.graph.Node)
|
||||
*/
|
||||
public Iterator<? extends BasicBlockInContext<T>> getPredNodes(BasicBlockInContext<T> N) {
|
||||
public Iterator<BasicBlockInContext<T>> getPredNodes(BasicBlockInContext<T> N) {
|
||||
initForPred(N);
|
||||
return g.getPredNodes(N);
|
||||
}
|
||||
|
@ -603,7 +603,7 @@ public abstract class AbstractInterproceduralCFG<T extends ISSABasicBlock> imple
|
|||
/*
|
||||
* @see com.ibm.wala.util.graph.EdgeManager#getSuccNodes(com.ibm.wala.util.graph.Node)
|
||||
*/
|
||||
public Iterator<? extends BasicBlockInContext<T>> getSuccNodes(BasicBlockInContext<T> N) {
|
||||
public Iterator<BasicBlockInContext<T>> getSuccNodes(BasicBlockInContext<T> N) {
|
||||
initForSucc(N);
|
||||
return g.getSuccNodes(N);
|
||||
}
|
||||
|
|
|
@ -1052,7 +1052,7 @@ public class PDG implements NumberedGraph<Statement> {
|
|||
return delegate.getPredNodeCount(N);
|
||||
}
|
||||
|
||||
public Iterator<? extends Statement> getPredNodes(Statement N) {
|
||||
public Iterator<Statement> getPredNodes(Statement N) {
|
||||
populate();
|
||||
if (!dOptions.isIgnoreHeap()) {
|
||||
computeIncomingHeapDependencies(N);
|
||||
|
@ -1106,7 +1106,7 @@ public class PDG implements NumberedGraph<Statement> {
|
|||
return delegate.getSuccNodeCount(N);
|
||||
}
|
||||
|
||||
public Iterator<? extends Statement> getSuccNodes(Statement N) {
|
||||
public Iterator<Statement> getSuccNodes(Statement N) {
|
||||
populate();
|
||||
if (!dOptions.isIgnoreHeap()) {
|
||||
computeOutgoingHeapDependencies(N);
|
||||
|
|
|
@ -288,7 +288,7 @@ public class SDG extends AbstractNumberedGraph<Statement> implements ISDG {
|
|||
return IteratorUtil.count(getPredNodes(N));
|
||||
}
|
||||
|
||||
public Iterator<? extends Statement> getPredNodes(Statement N) {
|
||||
public Iterator<Statement> getPredNodes(Statement N) {
|
||||
if (dOptions.isIgnoreExceptions()) {
|
||||
assert !N.getKind().equals(Kind.EXC_RET_CALLEE);
|
||||
assert !N.getKind().equals(Kind.EXC_RET_CALLER);
|
||||
|
@ -446,7 +446,7 @@ public class SDG extends AbstractNumberedGraph<Statement> implements ISDG {
|
|||
return IteratorUtil.count(getSuccNodes(N));
|
||||
}
|
||||
|
||||
public Iterator<? extends Statement> getSuccNodes(Statement N) {
|
||||
public Iterator<Statement> getSuccNodes(Statement N) {
|
||||
if (dOptions.isTerminateAtCast() && isUninformativeForReflection(N.getNode())) {
|
||||
return EmptyIterator.instance();
|
||||
}
|
||||
|
|
|
@ -355,7 +355,7 @@ class SDGSupergraph implements ISupergraph<Statement, PDG> {
|
|||
return 0;
|
||||
}
|
||||
|
||||
public Iterator<? extends Statement> getPredNodes(Statement N) {
|
||||
public Iterator<Statement> getPredNodes(Statement N) {
|
||||
return sdg.getPredNodes(N);
|
||||
}
|
||||
|
||||
|
@ -364,7 +364,7 @@ class SDGSupergraph implements ISupergraph<Statement, PDG> {
|
|||
return 0;
|
||||
}
|
||||
|
||||
public Iterator<? extends Statement> getSuccNodes(Statement N) {
|
||||
public Iterator<Statement> getSuccNodes(Statement N) {
|
||||
return sdg.getSuccNodes(N);
|
||||
}
|
||||
|
||||
|
|
|
@ -127,7 +127,7 @@ public class CISDG implements ISDG {
|
|||
return noHeap.getPredNodeNumbers(node);
|
||||
}
|
||||
|
||||
public Iterator<? extends Statement> getPredNodes(Statement N) {
|
||||
public Iterator<Statement> getPredNodes(Statement N) {
|
||||
if (DEBUG) {
|
||||
System.err.println("getPredNodes " + N);
|
||||
}
|
||||
|
@ -154,7 +154,7 @@ public class CISDG implements ISDG {
|
|||
return noHeap.getSuccNodeNumbers(node);
|
||||
}
|
||||
|
||||
public Iterator<? extends Statement> getSuccNodes(Statement N) {
|
||||
public Iterator<Statement> getSuccNodes(Statement N) {
|
||||
if (DEBUG) {
|
||||
System.err.println("getSuccNodes " + N);
|
||||
}
|
||||
|
|
|
@ -274,7 +274,7 @@ public class ExplodedControlFlowGraph implements ControlFlowGraph<SSAInstruction
|
|||
}
|
||||
}
|
||||
|
||||
public Iterator<? extends IExplodedBasicBlock> getPredNodes(IExplodedBasicBlock bb) throws IllegalArgumentException {
|
||||
public Iterator<IExplodedBasicBlock> getPredNodes(IExplodedBasicBlock bb) throws IllegalArgumentException {
|
||||
ExplodedBasicBlock eb = (ExplodedBasicBlock) bb;
|
||||
if (eb == null) {
|
||||
throw new IllegalArgumentException("eb == null");
|
||||
|
@ -315,7 +315,7 @@ public class ExplodedControlFlowGraph implements ControlFlowGraph<SSAInstruction
|
|||
/*
|
||||
* @see com.ibm.wala.util.graph.EdgeManager#getSuccNodes(java.lang.Object)
|
||||
*/
|
||||
public Iterator<? extends IExplodedBasicBlock> getSuccNodes(IExplodedBasicBlock bb) {
|
||||
public Iterator<IExplodedBasicBlock> getSuccNodes(IExplodedBasicBlock bb) {
|
||||
ExplodedBasicBlock eb = (ExplodedBasicBlock) bb;
|
||||
assert eb != null;
|
||||
if (eb.isExitBlock()) {
|
||||
|
|
|
@ -54,7 +54,7 @@ public abstract class AbstractGraph<T> implements Graph<T> {
|
|||
/*
|
||||
* @see com.ibm.wala.util.graph.EdgeManager#getPredNodes(java.lang.Object)
|
||||
*/
|
||||
public Iterator<? extends T> getPredNodes(T n) throws IllegalArgumentException {
|
||||
public Iterator<T> getPredNodes(T n) throws IllegalArgumentException {
|
||||
if (n == null) {
|
||||
throw new IllegalArgumentException("n cannot be null");
|
||||
}
|
||||
|
@ -74,7 +74,7 @@ public abstract class AbstractGraph<T> implements Graph<T> {
|
|||
/*
|
||||
* @see com.ibm.wala.util.graph.EdgeManager#getSuccNodes(java.lang.Object)
|
||||
*/
|
||||
public Iterator<? extends T> getSuccNodes(T n) throws IllegalArgumentException {
|
||||
public Iterator<T> getSuccNodes(T n) throws IllegalArgumentException {
|
||||
if (n == null) {
|
||||
throw new IllegalArgumentException("n cannot be null");
|
||||
}
|
||||
|
|
|
@ -155,7 +155,7 @@ public class Acyclic {
|
|||
return 0;
|
||||
}
|
||||
|
||||
public Iterator<? extends T> getPredNodes(T N) {
|
||||
public Iterator<T> getPredNodes(T N) {
|
||||
Assertions.UNREACHABLE();
|
||||
return null;
|
||||
}
|
||||
|
@ -165,7 +165,7 @@ public class Acyclic {
|
|||
return 0;
|
||||
}
|
||||
|
||||
public Iterator<? extends T> getSuccNodes(T N) {
|
||||
public Iterator<T> getSuccNodes(T N) {
|
||||
Assertions.UNREACHABLE();
|
||||
return null;
|
||||
}
|
||||
|
|
|
@ -26,7 +26,7 @@ public interface EdgeManager<T> {
|
|||
*
|
||||
* @return an {@link Iterator} over the immediate predecessor nodes of this Node.
|
||||
*/
|
||||
public Iterator<? extends T> getPredNodes(T n);
|
||||
public Iterator<T> getPredNodes(T n);
|
||||
|
||||
/**
|
||||
* Return the number of {@link #getPredNodes immediate predecessor} nodes of n
|
||||
|
@ -42,7 +42,7 @@ public interface EdgeManager<T> {
|
|||
*
|
||||
* @return an Iterator over the immediate successor nodes of n
|
||||
*/
|
||||
public Iterator<? extends T> getSuccNodes(T n);
|
||||
public Iterator<T> getSuccNodes(T n);
|
||||
|
||||
/**
|
||||
* Return the number of {@link #getSuccNodes immediate successor} nodes of this Node in the Graph
|
||||
|
|
|
@ -239,7 +239,7 @@ public class GraphSlicer {
|
|||
return preds.get(N).size();
|
||||
}
|
||||
|
||||
public Iterator<? extends E> getPredNodes(E N) {
|
||||
public Iterator<E> getPredNodes(E N) {
|
||||
if (!preds.containsKey(N)) {
|
||||
setPredNodes(N);
|
||||
}
|
||||
|
@ -253,7 +253,7 @@ public class GraphSlicer {
|
|||
return succs.get(N).size();
|
||||
}
|
||||
|
||||
public Iterator<? extends E> getSuccNodes(E N) {
|
||||
public Iterator<E> getSuccNodes(E N) {
|
||||
if (!succs.containsKey(N)) {
|
||||
setSuccNodes(N);
|
||||
}
|
||||
|
|
|
@ -79,7 +79,7 @@ public class BasicOrderedMultiGraph<T> implements OrderedMultiGraph<T> {
|
|||
/**
|
||||
* For now, this returns nodes in no particular order! Fix this when needed.
|
||||
*/
|
||||
public Iterator<? extends T> getPredNodes(T N) throws IllegalArgumentException {
|
||||
public Iterator<T> getPredNodes(T N) throws IllegalArgumentException {
|
||||
return delegate.getPredNodes(N);
|
||||
}
|
||||
|
||||
|
@ -87,7 +87,7 @@ public class BasicOrderedMultiGraph<T> implements OrderedMultiGraph<T> {
|
|||
return delegate.getSuccNodeCount(N);
|
||||
}
|
||||
|
||||
public Iterator<? extends T> getSuccNodes(T N) throws IllegalArgumentException {
|
||||
public Iterator<T> getSuccNodes(T N) throws IllegalArgumentException {
|
||||
return delegate.getSuccNodes(N);
|
||||
}
|
||||
|
||||
|
|
|
@ -53,7 +53,7 @@ public class DelegatingGraph<T> implements Graph<T> {
|
|||
return delegate.getPredNodeCount(N);
|
||||
}
|
||||
|
||||
public Iterator<? extends T> getPredNodes(T N) throws IllegalArgumentException {
|
||||
public Iterator<T> getPredNodes(T N) throws IllegalArgumentException {
|
||||
return delegate.getPredNodes(N);
|
||||
}
|
||||
|
||||
|
@ -61,7 +61,7 @@ public class DelegatingGraph<T> implements Graph<T> {
|
|||
return delegate.getSuccNodeCount(N);
|
||||
}
|
||||
|
||||
public Iterator<? extends T> getSuccNodes(T N) throws IllegalArgumentException {
|
||||
public Iterator<T> getSuccNodes(T N) throws IllegalArgumentException {
|
||||
return delegate.getSuccNodes(N);
|
||||
}
|
||||
|
||||
|
|
|
@ -28,7 +28,7 @@ public class InvertingEdgeManager<T> implements EdgeManager<T> {
|
|||
this.original = original;
|
||||
}
|
||||
|
||||
public Iterator<? extends T> getPredNodes(T N) throws IllegalArgumentException {
|
||||
public Iterator<T> getPredNodes(T N) throws IllegalArgumentException {
|
||||
return original.getSuccNodes(N);
|
||||
}
|
||||
|
||||
|
@ -36,7 +36,7 @@ public class InvertingEdgeManager<T> implements EdgeManager<T> {
|
|||
return original.getSuccNodeCount(N);
|
||||
}
|
||||
|
||||
public Iterator<? extends T> getSuccNodes(T N) throws IllegalArgumentException{
|
||||
public Iterator<T> getSuccNodes(T N) throws IllegalArgumentException{
|
||||
return original.getPredNodes(N);
|
||||
}
|
||||
|
||||
|
|
|
@ -29,7 +29,7 @@ public class InvertingNumberedEdgeManager<T> implements NumberedEdgeManager<T> {
|
|||
this.original = original;
|
||||
}
|
||||
|
||||
public Iterator<? extends T> getPredNodes(T N) throws IllegalArgumentException{
|
||||
public Iterator<T> getPredNodes(T N) throws IllegalArgumentException{
|
||||
return original.getSuccNodes(N);
|
||||
}
|
||||
|
||||
|
@ -37,7 +37,7 @@ public class InvertingNumberedEdgeManager<T> implements NumberedEdgeManager<T> {
|
|||
return original.getSuccNodeCount(N);
|
||||
}
|
||||
|
||||
public Iterator<? extends T> getSuccNodes(T N) throws IllegalArgumentException{
|
||||
public Iterator<T> getSuccNodes(T N) throws IllegalArgumentException{
|
||||
return original.getPredNodes(N);
|
||||
}
|
||||
|
||||
|
|
|
@ -73,7 +73,7 @@ public abstract class AbstractLabeledGraph<T, U> extends AbstractGraph<T> implem
|
|||
return getEdgeManager().getPredNodeCount(N, label);
|
||||
}
|
||||
|
||||
public Iterator<? extends T> getPredNodes(T N, U label) {
|
||||
public Iterator<T> getPredNodes(T N, U label) {
|
||||
return getEdgeManager().getPredNodes(N, label);
|
||||
}
|
||||
|
||||
|
|
|
@ -36,7 +36,7 @@ public abstract class AbstractNumberedLabeledGraph<T, U> extends AbstractNumbere
|
|||
return getEdgeManager().getPredNodeCount(N, label);
|
||||
}
|
||||
|
||||
public Iterator<? extends T> getPredNodes(T N, U label) {
|
||||
public Iterator<T> getPredNodes(T N, U label) {
|
||||
return getEdgeManager().getPredNodes(N, label);
|
||||
}
|
||||
|
||||
|
|
|
@ -74,7 +74,7 @@ public interface LabeledEdgeManager<T, U> extends EdgeManager<T> {
|
|||
*
|
||||
* @return an Iterator over the immediate predecessor nodes of this Node.
|
||||
*/
|
||||
public Iterator<? extends T> getPredNodes(T N, U label);
|
||||
public Iterator<T> getPredNodes(T N, U label);
|
||||
|
||||
/**
|
||||
*
|
||||
|
|
|
@ -113,7 +113,7 @@ public class SparseNumberedLabeledEdgeManager<T, U> implements NumberedLabeledEd
|
|||
* @see util.LabelledEdgeManager#getPredNodes(java.lang.Object,
|
||||
* java.lang.Object)
|
||||
*/
|
||||
public Iterator<? extends T> getPredNodes(T N, U label) {
|
||||
public Iterator<T> getPredNodes(T N, U label) {
|
||||
return getManagerForLabel(label).getPredNodes(N);
|
||||
}
|
||||
|
||||
|
@ -225,7 +225,7 @@ public class SparseNumberedLabeledEdgeManager<T, U> implements NumberedLabeledEd
|
|||
return count;
|
||||
}
|
||||
|
||||
public Iterator<? extends T> getPredNodes(T N) {
|
||||
public Iterator<T> getPredNodes(T N) {
|
||||
Collection<T> preds = HashSetFactory.make();
|
||||
for (U label : nodeToPredLabels.get(N)) {
|
||||
preds.addAll(Iterator2Collection.toSet(getPredNodes(N, label)));
|
||||
|
@ -241,7 +241,7 @@ public class SparseNumberedLabeledEdgeManager<T, U> implements NumberedLabeledEd
|
|||
return count;
|
||||
}
|
||||
|
||||
public Iterator<? extends T> getSuccNodes(T N) {
|
||||
public Iterator<T> getSuccNodes(T N) {
|
||||
Collection<T> succs = HashSetFactory.make();
|
||||
for (U label : nodeToSuccLabels.get(N)) {
|
||||
succs.addAll(Iterator2Collection.toSet(getSuccNodes(N, label)));
|
||||
|
|
Loading…
Reference in New Issue