1 4 package com.tctest.stringbuffer; 5 6 7 public final class StringBufferBuddy implements StringBuddy { 8 9 private final StringBuffer buffer; 10 11 public StringBufferBuddy(StringBuffer buffer) { 12 this.buffer = buffer; 13 } 14 15 public Object append(boolean b) { 16 return buffer.append(b); 17 } 18 19 public Object append(char c) { 20 return buffer.append(c); 21 } 22 23 public Object append(char[] str, int offset, int len) { 24 return buffer.append(str, offset, len); 25 } 26 27 public Object append(char[] str) { 28 return buffer.append(str); 29 } 30 31 public Object append(CharSequence s, int start, int end) { 32 return buffer.append(s, start, end); 33 } 34 35 public Object append(CharSequence s) { 36 return buffer.append(s); 37 } 38 39 public Object append(double d) { 40 return buffer.append(d); 41 } 42 43 public Object append(float f) { 44 return buffer.append(f); 45 } 46 47 public Object append(int i) { 48 return buffer.append(i); 49 } 50 51 public Object append(long lng) { 52 return buffer.append(lng); 53 } 54 55 public Object append(Object obj) { 56 return buffer.append(obj); 57 } 58 59 public Object append(String str) { 60 return buffer.append(str); 61 } 62 63 public Object appendCodePoint(int codePoint) { 64 return buffer.appendCodePoint(codePoint); 65 } 66 67 public int capacity() { 68 return buffer.capacity(); 69 } 70 71 public char charAt(int index) { 72 return buffer.charAt(index); 73 } 74 75 public int codePointAt(int index) { 76 return buffer.codePointAt(index); 77 } 78 79 public int codePointBefore(int index) { 80 return buffer.codePointBefore(index); 81 } 82 83 public int codePointCount(int beginIndex, int endIndex) { 84 return buffer.codePointCount(beginIndex, endIndex); 85 } 86 87 public Object delete(int start, int end) { 88 return buffer.delete(start, end); 89 } 90 91 public Object deleteCharAt(int index) { 92 return buffer.deleteCharAt(index); 93 } 94 95 public void ensureCapacity(int minimumCapacity) { 96 buffer.ensureCapacity(minimumCapacity); 97 } 98 99 public boolean equals(Object obj) { 100 return buffer.equals(obj); 101 } 102 103 public void getChars(int srcBegin, int srcEnd, char[] dst, 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, int end) { 136 return buffer.insert(dstOffset, s, start, end); 137 } 138 139 public Object insert(int dstOffset, CharSequence s) { 140 return buffer.insert(dstOffset, s); 141 } 142 143 public Object insert(int offset, double d) { 144 return buffer.insert(offset, d); 145 } 146 147 public Object insert(int offset, float f) { 148 return buffer.insert(offset, f); 149 } 150 151 public Object insert(int offset, int i) { 152 return buffer.insert(offset, i); 153 } 154 155 public Object insert(int offset, long l) { 156 return buffer.insert(offset, l); 157 } 158 159 public Object insert(int offset, Object obj) { 160 return buffer.insert(offset, obj); 161 } 162 163 public Object insert(int offset, String str) { 164 return buffer.insert(offset, str); 165 } 166 167 public int lastIndexOf(String str, int fromIndex) { 168 return buffer.lastIndexOf(str, fromIndex); 169 } 170 171 public int lastIndexOf(String str) { 172 return buffer.lastIndexOf(str); 173 } 174 175 public int length() { 176 return buffer.length(); 177 } 178 179 public int offsetByCodePoints(int index, int codePointOffset) { 180 return buffer.offsetByCodePoints(index, codePointOffset); 181 } 182 183 public Object replace(int start, int end, String str) { 184 return buffer.replace(start, end, str); 185 } 186 187 public Object reverse() { 188 return buffer.reverse(); 189 } 190 191 public void setCharAt(int index, char ch) { 192 buffer.setCharAt(index, ch); 193 } 194 195 public void setLength(int newLength) { 196 buffer.setLength(newLength); 197 } 198 199 public CharSequence subSequence(int start, int end) { 200 return buffer.subSequence(start, end); 201 } 202 203 public String substring(int start, int end) { 204 return buffer.substring(start, end); 205 } 206 207 public String substring(int start) { 208 return buffer.substring(start); 209 } 210 211 public String toString() { 212 return buffer.toString(); 213 } 214 215 public void trimToSize() { 216 buffer.trimToSize(); 217 } 218 }
| Popular Tags
|