public final class Mult
Scales an Integer stream.
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 final class MultExample { public static void main (String[] argv) { final One2OneChannel a = Channel.createOne2One (); final One2OneChannel b = Channel.createOne2One (); new Parallel ( new CSProcess[] { new Numbers (a.out ()), new Mult (42, a.in (), b.out ()), new Printer (b.in ()) } ).run (); } }
Constructor and description |
---|
Mult
(int n, ChannelInput in, ChannelOutput out) Construct a new Mult process with the input Channel in and the output Channel out. |
Construct a new Mult process with the input Channel in and the output Channel out.
n
- the multiplierin
- 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