Top Description Fields Constructors Methods
org.eclipse.persistence.internal.oxm

public Class StrBuffer

extends Object
implements CharSequence
Class Inheritance
All Implemented Interfaces
java.lang.CharSequence

INTERNAL:

Purpose: This is a non-synchronized, reusable implementation of StringBuffer.

Author
mmacivor

Field Summary

Modifier and TypeField and Description
private char[]
private int

Constructor Summary

AccessConstructor and Description
public
public
StrBuffer(int length)

Method Summary

Modifier and TypeMethod and Description
public StrBuffer
public StrBuffer
append(char[] chars, int start, int length)

public char
charAt(int
the index of the char value to be returned
index
)

Implements java.lang.CharSequence.charAt.

Returns the char value at the specified index.
private void
increaseCapacity(int minStorage)

public int
length()

Implements java.lang.CharSequence.length.

Returns the length of this character sequence.
public void
public CharSequence
subSequence(int
the start index, inclusive
start
,
int
the end index, exclusive
end
)

Implements java.lang.CharSequence.subSequence.

Returns a CharSequence that is a subsequence of this sequence.
public String
toString()

Overrides java.lang.Object.toString.

Implements java.lang.CharSequence.toString.

Returns a string containing the characters in this sequence in the same order as this sequence.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

myBufback to summary
private char[] myBuf
numCharback to summary
private int numChar

Constructor Detail

StrBufferback to summary
public StrBuffer()
StrBufferback to summary
public StrBuffer(int length)

Method Detail

appendback to summary
public StrBuffer append(String str)
appendback to summary
public StrBuffer append(char[] chars, int start, int length)
charAtback to summary
public char charAt(int index)

Implements java.lang.CharSequence.charAt.

Doc from java.lang.CharSequence.charAt.

Returns the char value at the specified index. An index ranges from zero to length() - 1. The first char value of the sequence is at index zero, the next at index one, and so on, as for array indexing.

If the char value specified by the index is a surrogate, the surrogate value is returned.

Parameters
index:int

the index of the char value to be returned

Returns:char

the specified char value

Annotations
@Override
increaseCapacityback to summary
private void increaseCapacity(int minStorage)
lengthback to summary
public int length()

Implements java.lang.CharSequence.length.

Doc from java.lang.CharSequence.length.

Returns the length of this character sequence. The length is the number of 16-bit chars in the sequence.

Returns:int

the number of chars in this sequence

Annotations
@Override
resetback to summary
public void reset()
subSequenceback to summary
public CharSequence subSequence(int start, int end)

Implements java.lang.CharSequence.subSequence.

Doc from java.lang.CharSequence.subSequence.

Returns a CharSequence that is a subsequence of this sequence. The subsequence starts with the char value at the specified index and ends with the char value at index end - 1. The length (in chars) of the returned sequence is end - start, so if start == end then an empty sequence is returned.

Parameters
start:int

the start index, inclusive

end:int

the end index, exclusive

Returns:CharSequence

the specified subsequence

Annotations
@Override
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Implements java.lang.CharSequence.toString.

Doc from java.lang.CharSequence.toString.

Returns a string containing the characters in this sequence in the same order as this sequence. The length of the string will be the length of this sequence.

Returns:String

a string consisting of exactly this sequence of characters

Annotations
@Override