equal
deleted
inserted
replaced
72 * @return a string description |
72 * @return a string description |
73 */ |
73 */ |
74 @Override |
74 @Override |
75 public String toString() { |
75 public String toString() { |
76 |
76 |
77 StringBuffer buf = new StringBuffer(); |
77 StringBuilder sb = new StringBuilder(); |
78 for (int i = 0; i < controls.length; i++) { |
78 for (int i = 0; i < controls.length; i++) { |
79 if (i != 0) { |
79 if (i != 0) { |
80 buf.append(", "); |
80 sb.append(", "); |
81 if ((i + 1) == controls.length) { |
81 if ((i + 1) == controls.length) { |
82 buf.append("and "); |
82 sb.append("and "); |
83 } |
83 } |
84 } |
84 } |
85 buf.append(controls[i].getType()); |
85 sb.append(controls[i].getType()); |
86 } |
86 } |
87 |
87 |
88 return new String(getType() + " Control containing " + buf + " Controls."); |
88 return new String(getType() + " Control containing " + sb + " Controls."); |
89 } |
89 } |
90 |
90 |
91 /** |
91 /** |
92 * An instance of the {@code CompoundControl.Type} inner class identifies |
92 * An instance of the {@code CompoundControl.Type} inner class identifies |
93 * one kind of compound control. Static instances are provided for the |
93 * one kind of compound control. Static instances are provided for the |