001: /*
002: * All content copyright (c) 2003-2007 Terracotta, Inc., except as may otherwise be noted in a separate copyright notice. All rights reserved.
003: */
004: package com.tctest.stringbuffer;
005:
006: public final class StringBuilderBuddy implements StringBuddy {
007: private final StringBuilder builder;
008:
009: public StringBuilderBuddy(StringBuilder builder) {
010: this .builder = builder;
011: }
012:
013: public Object append(boolean b) {
014: return builder.append(b);
015: }
016:
017: public Object append(char c) {
018: return builder.append(c);
019: }
020:
021: public Object append(char[] str, int offset, int len) {
022: return builder.append(str, offset, len);
023: }
024:
025: public Object append(char[] str) {
026: return builder.append(str);
027: }
028:
029: public Object append(CharSequence s, int start, int end) {
030: return builder.append(s, start, end);
031: }
032:
033: public Object append(CharSequence s) {
034: return builder.append(s);
035: }
036:
037: public Object append(double d) {
038: return builder.append(d);
039: }
040:
041: public Object append(float f) {
042: return builder.append(f);
043: }
044:
045: public Object append(int i) {
046: return builder.append(i);
047: }
048:
049: public Object append(long lng) {
050: return builder.append(lng);
051: }
052:
053: public Object append(Object obj) {
054: return builder.append(obj);
055: }
056:
057: public Object append(String str) {
058: return builder.append(str);
059: }
060:
061: public Object append(StringBuffer sb) {
062: return builder.append(sb);
063: }
064:
065: public Object appendCodePoint(int codePoint) {
066: return builder.appendCodePoint(codePoint);
067: }
068:
069: public int capacity() {
070: return builder.capacity();
071: }
072:
073: public char charAt(int index) {
074: return builder.charAt(index);
075: }
076:
077: public int codePointAt(int index) {
078: return builder.codePointAt(index);
079: }
080:
081: public int codePointBefore(int index) {
082: return builder.codePointBefore(index);
083: }
084:
085: public int codePointCount(int beginIndex, int endIndex) {
086: return builder.codePointCount(beginIndex, endIndex);
087: }
088:
089: public Object delete(int start, int end) {
090: return builder.delete(start, end);
091: }
092:
093: public Object deleteCharAt(int index) {
094: return builder.deleteCharAt(index);
095: }
096:
097: public void ensureCapacity(int minimumCapacity) {
098: builder.ensureCapacity(minimumCapacity);
099: }
100:
101: public boolean equals(Object obj) {
102: return builder.equals(obj);
103: }
104:
105: public void getChars(int srcBegin, int srcEnd, char[] dst,
106: int dstBegin) {
107: builder.getChars(srcBegin, srcEnd, dst, dstBegin);
108: }
109:
110: public int hashCode() {
111: return builder.hashCode();
112: }
113:
114: public int indexOf(String str, int fromIndex) {
115: return builder.indexOf(str, fromIndex);
116: }
117:
118: public int indexOf(String str) {
119: return builder.indexOf(str);
120: }
121:
122: public Object insert(int offset, boolean b) {
123: return builder.insert(offset, b);
124: }
125:
126: public Object insert(int offset, char c) {
127: return builder.insert(offset, c);
128: }
129:
130: public Object insert(int index, char[] str, int offset, int len) {
131: return builder.insert(index, str, offset, len);
132: }
133:
134: public Object insert(int offset, char[] str) {
135: return builder.insert(offset, str);
136: }
137:
138: public Object insert(int dstOffset, CharSequence s, int start,
139: int end) {
140: return builder.insert(dstOffset, s, start, end);
141: }
142:
143: public Object insert(int dstOffset, CharSequence s) {
144: return builder.insert(dstOffset, s);
145: }
146:
147: public Object insert(int offset, double d) {
148: return builder.insert(offset, d);
149: }
150:
151: public Object insert(int offset, float f) {
152: return builder.insert(offset, f);
153: }
154:
155: public Object insert(int offset, int i) {
156: return builder.insert(offset, i);
157: }
158:
159: public Object insert(int offset, long l) {
160: return builder.insert(offset, l);
161: }
162:
163: public Object insert(int offset, Object obj) {
164: return builder.insert(offset, obj);
165: }
166:
167: public Object insert(int offset, String str) {
168: return builder.insert(offset, str);
169: }
170:
171: public int lastIndexOf(String str, int fromIndex) {
172: return builder.lastIndexOf(str, fromIndex);
173: }
174:
175: public int lastIndexOf(String str) {
176: return builder.lastIndexOf(str);
177: }
178:
179: public int length() {
180: return builder.length();
181: }
182:
183: public int offsetByCodePoints(int index, int codePointOffset) {
184: return builder.offsetByCodePoints(index, codePointOffset);
185: }
186:
187: public Object replace(int start, int end, String str) {
188: return builder.replace(start, end, str);
189: }
190:
191: public Object reverse() {
192: return builder.reverse();
193: }
194:
195: public void setCharAt(int index, char ch) {
196: builder.setCharAt(index, ch);
197: }
198:
199: public void setLength(int newLength) {
200: builder.setLength(newLength);
201: }
202:
203: public CharSequence subSequence(int start, int end) {
204: return builder.subSequence(start, end);
205: }
206:
207: public String substring(int start, int end) {
208: return builder.substring(start, end);
209: }
210:
211: public String substring(int start) {
212: return builder.substring(start);
213: }
214:
215: public String toString() {
216: return builder.toString();
217: }
218:
219: public void trimToSize() {
220: builder.trimToSize();
221: }
222:
223: }
|