API Overview API Index Package Overview Direct link to this page
JDK 1.6
  java.lang. StringBuilder View Source
Author(s)
Michael McCloskey
Since
1.5
Version
1.11, 11/17/05
Serial
Hierarchy
 Object
      AbstractStringBuilder
          StringBuilder
Implements
 Serializable
 CharSequence
Subclasses
Description
publicfinal class StringBuilder
  A mutable sequence of characters.
See also:    StringBuffer String
Constructors
public StringBuilder ()
Constructs a string builder with no characters in it and an initial capacity of 16 characters.
public StringBuilder (CharSequence seq)
  Constructs a string builder that contains the same characters as the specified CharSequence.
public StringBuilder (int capacity)
  Constructs a string builder with no characters in it and an initial capacity specified by the capacity argument.
public StringBuilder (String str)
  Constructs a string builder initialized to the contents of the specified string.
Methods
Hide/Show inherited methods
public StringBuilder append (boolean b) [Overrides AbstractStringBuilder]
 
public StringBuilder append (char c) [Overrides AbstractStringBuilder]
public StringBuilder append (char[] str) [Overrides AbstractStringBuilder]
public StringBuilder append (char[] str, int offset, int len) [Overrides AbstractStringBuilder]
public StringBuilder append (CharSequence s) [Overrides AbstractStringBuilder]
 
public StringBuilder append (CharSequence s, int start, int end) [Overrides AbstractStringBuilder]
 
public StringBuilder append (double d) [Overrides AbstractStringBuilder]
 
public StringBuilder append (float f) [Overrides AbstractStringBuilder]
 
public StringBuilder append (int i) [Overrides AbstractStringBuilder]
 
public StringBuilder append (long lng) [Overrides AbstractStringBuilder]
 
public StringBuilder append (Object obj) [Overrides AbstractStringBuilder]
 
public StringBuilder append (String str) [Overrides AbstractStringBuilder]
public StringBuilder append (StringBuffer sb) [Overrides AbstractStringBuilder]
  Appends the specified StringBuffer to this sequence.
public StringBuilder appendCodePoint (int codePoint) [Overrides AbstractStringBuilder]
 
public int capacity () [Inherited From AbstractStringBuilder]
  Returns the current capacity.
public char charAt (int index) [Inherited From AbstractStringBuilder]
  Returns the char value in this sequence at the specified index.
public int codePointAt (int index) [Inherited From AbstractStringBuilder]
Returns the character (Unicode code point) at the specified index.
public int codePointBefore (int index) [Inherited From AbstractStringBuilder]
Returns the character (Unicode code point) before the specified index.
public int codePointCount (int beginIndex, int endIndex) [Inherited From AbstractStringBuilder]
  Returns the number of Unicode code points in the specified text range of this sequence.
public StringBuilder delete (int start, int end) [Overrides AbstractStringBuilder]
 
public StringBuilder deleteCharAt (int index) [Overrides AbstractStringBuilder]
 
public void ensureCapacity (int minimumCapacity) [Inherited From AbstractStringBuilder]
  Ensures that the capacity is at least equal to the specified minimum.
pack-private void expandCapacity (int minimumCapacity) [Inherited From AbstractStringBuilder]
This implements the expansion semantics of ensureCapacity with no size check or synchronization.
public void getChars (int srcBegin, int srcEnd, char[] dst, int dstBegin) [Inherited From AbstractStringBuilder]
  Characters are copied from this sequence into the destination character array dst.
pack-privatefinal char getValue () [Inherited From AbstractStringBuilder]
Needed by String for the contentEquals method.
public int indexOf (String str) [Overrides AbstractStringBuilder]
 
public int indexOf (String str, int fromIndex) [Overrides AbstractStringBuilder]
 
public StringBuilder insert (int offset, boolean b) [Overrides AbstractStringBuilder]
 
public StringBuilder insert (int offset, char c) [Overrides AbstractStringBuilder]
 
public StringBuilder insert (int offset, char[] str) [Overrides AbstractStringBuilder]
 
public StringBuilder insert (int index, char[] str, int offset, int len) [Overrides AbstractStringBuilder]
 
public StringBuilder insert (int dstOffset, CharSequence s) [Overrides AbstractStringBuilder]
 
public StringBuilder insert (int dstOffset, CharSequence s, int start, int end) [Overrides AbstractStringBuilder]
 
public StringBuilder insert (int offset, double d) [Overrides AbstractStringBuilder]
 
public StringBuilder insert (int offset, float f) [Overrides AbstractStringBuilder]
 
public StringBuilder insert (int offset, int i) [Overrides AbstractStringBuilder]
 
public StringBuilder insert (int offset, long l) [Overrides AbstractStringBuilder]
 
public StringBuilder insert (int offset, Object obj) [Overrides AbstractStringBuilder]
 
public StringBuilder insert (int offset, String str) [Overrides AbstractStringBuilder]
 
public int lastIndexOf (String str) [Overrides AbstractStringBuilder]
 
public int lastIndexOf (String str, int fromIndex) [Overrides AbstractStringBuilder]
 
public int length () [Inherited From AbstractStringBuilder]
  Returns the length (character count).
public int offsetByCodePoints (int index, int codePointOffset) [Inherited From AbstractStringBuilder]
  Returns the index within this sequence that is offset from the given index by codePointOffset code points.
public StringBuilder replace (int start, int end, String str) [Overrides AbstractStringBuilder]
 
public StringBuilder reverse () [Overrides AbstractStringBuilder]
public void setCharAt (int index, char ch) [Inherited From AbstractStringBuilder]
  The character at the specified index is set to ch.
public void setLength (int newLength) [Inherited From AbstractStringBuilder]
  Sets the length of the character sequence.
pack-privatestatic int stringSizeOfInt (int x) [Inherited From AbstractStringBuilder]
pack-privatestatic int stringSizeOfLong (long x) [Inherited From AbstractStringBuilder]
public CharSequence subSequence (int start, int end) [Inherited From AbstractStringBuilder]
  Returns a new character sequence that is a subsequence of this sequence.
public String substring (int start) [Inherited From AbstractStringBuilder]
  Returns a new String that contains a subsequence of characters currently contained in this character sequence.
public String substring (int start, int end) [Inherited From AbstractStringBuilder]
  Returns a new String that contains a subsequence of characters currently contained in this sequence.
public String toString () [Specified in CharSequence]
public void trimToSize () [Inherited From AbstractStringBuilder]
Attempts to reduce storage used for the character sequence.
Fields
Hide/Show inherited fields
pack-private int count [Inherited From AbstractStringBuilder]
The count is the number of characters used.
pack-privatefinalstatic long serialVersionUID = "4383685877147921099"
use serialVersionUID for interoperability
pack-privatefinalstatic int sizeTable [Inherited From AbstractStringBuilder]
pack-private char value [Inherited From AbstractStringBuilder]
The value is used for character storage.
Nested Classes
Generated By: JavaOnTracks Doclet 0.1.4     ©Thibaut Colar