Package org.jcsp.plugNplay.ints
Class SubstituteInt
java.lang.Object
org.jcsp.plugNplay.ints.SubstituteInt
- All Implemented Interfaces:
CSProcess
Substitutes a user-configured constant for each integer in the stream
flowing through.
Process Diagram
Description
SubstituteInt is a process that substitutes the (constant) n with which it is configured for everything recieved on its in channel. So, its output stream has constant values but its rate of flow is triggered by its input.
Channel Protocols
Input Channels | ||
---|---|---|
in | int | All channels in this package carry integers. |
Output Channels | ||
out | int | All channels in this package carry integers. |
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final ChannelInputInt
The input Channelprivate final int
The int to be sent down the out Channel.private final ChannelOutputInt
The output Channel -
Constructor Summary
ConstructorsConstructorDescriptionSubstituteInt
(ChannelInputInt in, ChannelOutputInt out, int n) Construct a new SubstituteInt process. -
Method Summary
-
Field Details
-
n
private final int nThe int to be sent down the out Channel. -
in
The input Channel -
out
The output Channel
-
-
Constructor Details
-
SubstituteInt
Construct a new SubstituteInt process.- Parameters:
in
- the input Channelout
- the output Channeln
- the integer to be sent down the out Channel.
-
-
Method Details