~ubuntu-branches/ubuntu/precise/jcsp/precise

« back to all changes in this revision

Viewing changes to src/jcsp-demos/doc-ex/jcsp/plugNplay/ints/SuccessorIntExample.java

  • Committer: Bazaar Package Importer
  • Author(s): Miguel Landaeta
  • Date: 2010-06-20 18:12:26 UTC
  • Revision ID: james.westby@ubuntu.com-20100620181226-8yg8d9rjjjiuy7oz
Tags: upstream-1.1-rc4
ImportĀ upstreamĀ versionĀ 1.1-rc4

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
import org.jcsp.lang.*;
 
2
import org.jcsp.plugNplay.ints.*;
 
3
 
 
4
public class SuccessorIntExample {
 
5
 
 
6
  public static void main (String[] argv) {
 
7
 
 
8
    final One2OneChannelInt a = Channel.one2oneInt ();
 
9
    final One2OneChannelInt b = Channel.one2oneInt ();
 
10
 
 
11
    new Parallel (
 
12
      new CSProcess[] {
 
13
        new NumbersInt (a.out ()),
 
14
        new SuccessorInt (a.in (), b.out ()),
 
15
        new PrinterInt (b.in (), "--> ", "\n")
 
16
      }
 
17
    ).run ();
 
18
 
 
19
  }
 
20
 
 
21
}