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