public class PrependingStringBuffer extends Object
| Constructor and Description |
|---|
PrependingStringBuffer()
Default constructor, the internal initial buffer size will be 16
|
PrependingStringBuffer(int size)
Constructs this PrependingStringBuffer with the given buffer size.
|
PrependingStringBuffer(String start)
Constructs and direct inserts the given string.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj) |
int |
hashCode() |
int |
length()
Returns the size of this PrependingStringBuffer
|
PrependingStringBuffer |
prepend(char ch)
Prepends one char to this PrependingStringBuffer
|
PrependingStringBuffer |
prepend(String str)
Prepends the string to this PrependingStringBuffer
|
String |
toString() |
public PrependingStringBuffer()
public PrependingStringBuffer(int size)
size - The initial size of the buffer.public PrependingStringBuffer(String start)
start - The string that is directly inserted.public PrependingStringBuffer prepend(char ch)
ch - The char that will be prependedpublic PrependingStringBuffer prepend(String str)
str - The string that will be prependedpublic int length()
public String toString()
toString in class ObjectObject.toString()Copyright © 2006–2020 Apache Software Foundation. All rights reserved.