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