1 2 3 package SOFA.SOFAnode.Util; 4 5 abstract class Protocol implements Printer { 6 7 protected Object element; 8 9 public Protocol( Object 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 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 p1, Object p2 ); 40 } | Popular Tags |