1 19 package org.netbeans.tax.decl; 20 21 import java.util.*; 22 23 import org.netbeans.tax.*; 24 25 public class ChoiceType extends ChildrenType { 26 27 31 public ChoiceType (Collection types) { 32 super (types); 33 } 34 35 public ChoiceType () { 36 super (); 37 } 38 39 public ChoiceType (ChoiceType choiceType) { 40 super (choiceType); 41 } 42 43 44 46 public Object clone () { 47 return new ChoiceType (this); 48 } 49 50 54 56 public String toString () { 57 Iterator it = getTypes ().iterator (); 58 StringBuffer sb = new StringBuffer (); 59 while (it.hasNext ()) { 60 TreeElementDecl.ContentType next = (TreeElementDecl.ContentType) it.next (); 61 sb.append (" | ").append (next.toString ()); } 63 if (sb.length () > 0) sb.delete (0,3); 64 65 return "( " + sb.toString () + " )" + getMultiplicity (); } 67 68 70 public String getName () { 71 return Util.THIS.getString ("NAME_CHOICE") + getMultiplicity (); 72 } 73 74 76 public String getSeparator () { 77 return "|"; } 79 80 } 81 | Popular Tags |