KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > SOFA > SOFAnode > Util > Protocol


1 /* $Id: Protocol.java,v 1.1.1.1 2003/02/11 16:19:41 bures Exp $ */
2
3 package SOFA.SOFAnode.Util;
4
5 abstract class Protocol implements Printer {
6     
7     protected Object JavaDoc element;
8     
9     public Protocol( Object JavaDoc e ) {
10     element = e;
11     }
12     
13     public abstract boolean Restrict( ActionTokenArray a );
14
15     public abstract Machine createMachine();
16
17     public abstract Protocol Copy();
18     
19     public void Print(int level ) {
20     ((Printer)element).Print(level);
21     }
22
23     public void Print() {
24     this.Print(1);
25     }
26
27     public Object JavaDoc getElement() {
28     return element;
29     }
30
31     public Protocol Left() {
32     return null;
33     }
34
35     public Protocol Right() {
36     return null;
37     }
38
39     public abstract Protocol getSameType( Object JavaDoc p1, Object JavaDoc p2 );
40 }
Popular Tags