Skip to content
Snippets Groups Projects
Commit dd4038d3 authored by Nelson Tavares de Sousa's avatar Nelson Tavares de Sousa
Browse files

changed type for higher type safety

parent 01e6dbd3
No related branches found
No related tags found
No related merge requests found
...@@ -30,7 +30,7 @@ import teetime.framework.signal.ISignal; ...@@ -30,7 +30,7 @@ import teetime.framework.signal.ISignal;
* This stage merges data from the input ports, by taking elements according to the chosen merge strategy and by putting them to the output port. * This stage merges data from the input ports, by taking elements according to the chosen merge strategy and by putting them to the output port.
* For its signal handling behavior see {@link #onSignal(ISignal, InputPort)} * For its signal handling behavior see {@link #onSignal(ISignal, InputPort)}
* *
* @author Christian Wulf * @author Christian Wulf, Nelson Tavares de Sousa
* *
* @since 1.0 * @since 1.0
* *
...@@ -43,7 +43,7 @@ public final class Merger<T> extends AbstractStage { ...@@ -43,7 +43,7 @@ public final class Merger<T> extends AbstractStage {
private IMergerStrategy strategy; private IMergerStrategy strategy;
private final Map<Class<?>, Set<InputPort<?>>> signalMap = new HashMap<Class<?>, Set<InputPort<?>>>(); private final Map<Class<ISignal>, Set<InputPort<?>>> signalMap = new HashMap<Class<ISignal>, Set<InputPort<?>>>();
public Merger() { public Merger() {
this(new RoundRobinStrategy()); this(new RoundRobinStrategy());
...@@ -92,7 +92,7 @@ public final class Merger<T> extends AbstractStage { ...@@ -92,7 +92,7 @@ public final class Merger<T> extends AbstractStage {
} else { } else {
Set<InputPort<?>> tempSet = new HashSet<InputPort<?>>(); Set<InputPort<?>> tempSet = new HashSet<InputPort<?>>();
tempSet.add(inputPort); tempSet.add(inputPort);
signalMap.put(signal.getClass(), tempSet); signalMap.put((Class<ISignal>) signal.getClass(), tempSet);
} }
} }
......
...@@ -38,7 +38,7 @@ public class WordCountingTest { ...@@ -38,7 +38,7 @@ public class WordCountingTest {
@Test @Test
public void test1() throws IOException { public void test1() throws IOException {
int threads = 6; int threads = 2;
WordCountingConfiguration wcc = new WordCountingConfiguration(threads, testFile, testFile); WordCountingConfiguration wcc = new WordCountingConfiguration(threads, testFile, testFile);
Analysis analysis = new Analysis(wcc); Analysis analysis = new Analysis(wcc);
analysis.start(); analysis.start();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment