Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
ChatString |
|
| 1.0;1 |
1 | /* | |
2 | * $Id: ChatString.java 7976 2007-08-21 14:26:13Z dirk.olmes $ | |
3 | * -------------------------------------------------------------------------------------- | |
4 | * Copyright (c) MuleSource, Inc. All rights reserved. http://www.mulesource.com | |
5 | * | |
6 | * The software in this package is published under the terms of the CPAL v1.0 | |
7 | * license, a copy of which has been included with this distribution in the | |
8 | * LICENSE.txt file. | |
9 | */ | |
10 | ||
11 | package org.mule.samples.hello; | |
12 | ||
13 | import java.io.Serializable; | |
14 | ||
15 | /** | |
16 | * <code>ChatString</code> TODO (document class) | |
17 | * | |
18 | * @author <a href="mailto:ross.mason@symphonysoft.com">Ross Mason</a> | |
19 | * @version $Revision: 7976 $ | |
20 | */ | |
21 | 0 | public class ChatString implements Serializable |
22 | { | |
23 | /** | |
24 | * Serial version | |
25 | */ | |
26 | private static final long serialVersionUID = -3140370545357738491L; | |
27 | ||
28 | 0 | private StringBuffer string = new StringBuffer(); |
29 | ||
30 | /** | |
31 | * @param str | |
32 | * @return | |
33 | */ | |
34 | public StringBuffer append(String str) | |
35 | { | |
36 | 0 | return string.append(str); |
37 | } | |
38 | ||
39 | /** | |
40 | * @param sb | |
41 | * @return | |
42 | */ | |
43 | public StringBuffer append(StringBuffer sb) | |
44 | { | |
45 | 0 | return string.append(sb); |
46 | } | |
47 | ||
48 | /** | |
49 | * @param offset | |
50 | * @param str | |
51 | * @return | |
52 | */ | |
53 | public StringBuffer insert(int offset, char[] str) | |
54 | { | |
55 | 0 | return string.insert(offset, str); |
56 | } | |
57 | ||
58 | /** | |
59 | * @param index | |
60 | * @param str | |
61 | * @param offset | |
62 | * @param len | |
63 | * @return | |
64 | */ | |
65 | public StringBuffer insert(int index, char[] str, int offset, int len) | |
66 | { | |
67 | 0 | return string.insert(index, str, offset, len); |
68 | } | |
69 | ||
70 | /* | |
71 | * (non-Javadoc) | |
72 | * | |
73 | * @see java.lang.Object#toString() | |
74 | */ | |
75 | public String toString() | |
76 | { | |
77 | 0 | return string.toString(); |
78 | } | |
79 | ||
80 | public int getSize() | |
81 | { | |
82 | 0 | return string.length(); |
83 | } | |
84 | ||
85 | } |