Package org.jcsp.plugNplay
Class Generate
- java.lang.Object
-
- org.jcsp.plugNplay.Generate
-
- All Implemented Interfaces:
CSProcess
public final class Generate extends java.lang.Object implements CSProcess
Generates an infinite (constant) sequence of Integers.Process Diagram
Description
Generate is a process that generates an infinite sequence of the integer, n, with which it is configured.Channel Protocols
Output Channels out java.lang.Integer The output will always be of type Integer.
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.Integer
N
The output numberprivate ChannelOutput
out
The output Channel
-
Constructor Summary
Constructors Constructor Description Generate(ChannelOutput out, int n)
Construct a new Generate process with the output channel out.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
run()
The main body of this process.
-
-
-
Field Detail
-
out
private final ChannelOutput out
The output Channel
-
N
private final java.lang.Integer N
The output number
-
-
Constructor Detail
-
Generate
public Generate(ChannelOutput out, int n)
Construct a new Generate process with the output channel out.- Parameters:
out
- the output channeln
- the integer to generate
-
-