gov.nasa.worldwind.util
Class CompoundStringBuffer
java.lang.Object
gov.nasa.worldwind.util.CompoundBuffer<java.lang.StringBuilder,java.lang.CharSequence>
gov.nasa.worldwind.util.CompoundStringBuffer
public class CompoundStringBuffer
- extends CompoundBuffer<java.lang.StringBuilder,java.lang.CharSequence>
An implementation of CompoundBuffer which manages a collection of CharSequence buffers in a single
StringBuilder.
|
Constructor Summary |
CompoundStringBuffer(int initialCapacity,
int subSequenceLength)
Constructs a CompoundStringBuffer with the specified initial capacity. |
|
Method Summary |
protected void |
append(java.lang.CharSequence buffer)
|
protected int |
getSize(java.lang.CharSequence buffer)
|
protected java.lang.CharSequence |
getSubBuffer(int position,
int length)
|
java.lang.String |
getSubString(int index)
Returns the substring identified by the specified index. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CompoundStringBuffer
public CompoundStringBuffer(int initialCapacity,
int subSequenceLength)
- Constructs a CompoundStringBuffer with the specified initial capacity.
- Parameters:
initialCapacity - the compound buffer's initial capacity.subSequenceLength - an estimate of the size of each sub-sequence.
- Throws:
java.lang.IllegalArgumentException - if the initialCapacity is negative.
append
protected void append(java.lang.CharSequence buffer)
- Specified by:
append in class CompoundBuffer<java.lang.StringBuilder,java.lang.CharSequence>
getSize
protected int getSize(java.lang.CharSequence buffer)
- Specified by:
getSize in class CompoundBuffer<java.lang.StringBuilder,java.lang.CharSequence>
getSubBuffer
protected java.lang.CharSequence getSubBuffer(int position,
int length)
- Specified by:
getSubBuffer in class CompoundBuffer<java.lang.StringBuilder,java.lang.CharSequence>
getSubString
public java.lang.String getSubString(int index)
- Returns the substring identified by the specified index. Index i corresponds to the ith string.
- Parameters:
index - the index of the string to get.
- Returns:
- the string at the specified index.
- Throws:
java.lang.IllegalArgumentException - if the index is out of range.