public final class Successor
Adds one to each Integer in the stream flowing through.
Input Channels | ||
---|---|---|
in | java.lang.Number | The Channel can accept data from any subclass of Number. All values will be converted to ints. |
Output Channels | ||
out | java.lang.Integer | The output will always be of type Integer. |
import org.jcsp.lang.*; import org.jcsp.util.*; public class SuccessorExample { public static void main (String[] argv) { One2OneChannel a = Channel.createOne2One (); One2OneChannel b = Channel.createOne2One (); new Parallel ( new CSProcess[] { new Numbers (a.out ()), new Successor (a.in (), b.out ()), new Printer (b.in ()) } ).run (); } }
Constructor and description |
---|
Successor
(ChannelInput in, ChannelOutput out) Construct a new Successor process with the input Channel in and the output Channel out. |
Construct a new Successor process with the input Channel in and the output Channel out.
in
- the input Channel.out
- the output Channel.JCSP for Java 1.8 generated 14-10-2016 by Jon Kerridge, Edinburgh Napier University - j dot kerridge at napier dot ac dot uk