1 2 package SOFA.SOFAnode.Made.CDL; 3 4 class CompProtUnOper extends CompProtOper { 5 public CompProtOper operand; 6 public CompProtUnOper(CompProtOper operand, int kind) { 7 super(kind); 8 this.operand = operand; 9 } 10 11 public String toText() { 12 StringBuffer sb = new StringBuffer ("("); 13 switch (type) { 14 case CompProtKind.p_repetition: 15 sb.append(operand.toText()); 16 sb.append(")*"); 17 break; 18 default: break; 19 } 20 return sb.toString(); 21 } 22 } 23 | Popular Tags |