public final class SuccessorInt
Adds one to each integer in the stream flowing through.
Input Channels | ||
---|---|---|
in | int | All channels in this package carry integers. |
Output Channels | ||
out | int | All channels in this package carry integers. |
import org.jcsp.lang.*; import org.jcsp.util.ints.*; public final class SuccessorIntExample { public static void main (String[] argv) { final One2OneChannelInt a = ChannelInt.createOne2One (); final One2OneChannelInt b = ChannelInt.createOne2One (); new Parallel ( new CSProcess[] { new NumbersInt (a.out ()), new SuccessorInt (a.in (), b.out ()), new PrinterInt (b.in ()) } ).run (); } }
Constructor and description |
---|
SuccessorInt
(ChannelInputInt in, ChannelOutputInt out) Construct a new SuccessorInt process with the input Channel in and the output Channel out. |
Construct a new SuccessorInt process with the input Channel in and the output Channel out.
in
- the input Channelout
- the output ChannelJCSP for Java 1.8 generated 14-10-2016 by Jon Kerridge, Edinburgh Napier University - j dot kerridge at napier dot ac dot uk