seqdelta2int.java

来自「java连接mysql包!! !!! 支持」· Java 代码 · 共 44 行

JAVA
44
字号
import jcsp.lang.*;

class SeqDelta2Int  implements CSProcess {

  /** The input Channel */
  private final ChannelInputInt  in;

  /** The first output Channel */
  private final ChannelOutputInt out0;

  /** The second output Channel */
  private final ChannelOutputInt out1;

  /**
   * Construct a new Delta2Int process with the input Channel in and the output
   * Channels out0 and out1. The ordering of the Channels out0 and out1 make
   * no difference to the functionality of this process.
   *
   * @param in the input channel
   * @param out0 an output Channel
   * @param out1 an output Channel
   */
  public SeqDelta2Int (final ChannelInputInt in,
                       final ChannelOutputInt out0, final ChannelOutputInt out1) {
    this.in   = in;
    this.out0 = out0;
    this.out1 = out1;
  }

  /**
   * The main body of this process.
   */
  public void run () {

    while (true) {
      int value = in.read ();
      out0.write (value);
      out1.write (value);
    }

  }

}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?