@Test public void testPull2() { ImpoliteQueueSource qs1 = new ImpoliteQueueSource(); qs1.setEvents(1, 2, 3).loop(false); ImpoliteQueueSource qs2 = new ImpoliteQueueSource(); qs2.setEvents(4, 5).loop(false); Multiplex m = new Multiplex(2); Connector.connect(qs2, 0, m, 0); Connector.connect(qs1, 0, m, 1); Pullable p = m.getPullableOutput(); assertTrue(p.hasNext()); int x = (Integer) p.pull(); assertEquals(4, x); x = (Integer) p.pull(); assertEquals(1, x); x = (Integer) p.pull(); assertEquals(5, x); x = (Integer) p.pull(); assertEquals(2, x); x = (Integer) p.pull(); assertEquals(3, x); assertFalse(p.hasNext()); }
@Override public Pullable getPullableOutput(int index) { return new MuxPullable(); }
Multiplex extends Processor { @Override public Pullable getPullableOutput(int index) { return new MuxPullable(); } }
Multiplex extends Processor { @Override public Pullable getPullableOutput(int index) { return new MuxPullable(); } Multiplex(int in_arity); }
Multiplex extends Processor { @Override public Pullable getPullableOutput(int index) { return new MuxPullable(); } Multiplex(int in_arity); @Override final Pushable getPushableInput(int index); @Override Pullable getPullableOutput(int index); @Override Multiplex duplicate(boolean with_state); }
Multiplex extends Processor { @Override public Pullable getPullableOutput(int index) { return new MuxPullable(); } Multiplex(int in_arity); @Override final Pushable getPushableInput(int index); @Override Pullable getPullableOutput(int index); @Override Multiplex duplicate(boolean with_state);  }