Intel

Developer Zone

StringBuilder

java.lang

Class StringBuilder

    • Constructor Detail

      • StringBuilder

        public StringBuilder()
      • StringBuilder

        public StringBuilder(int capacity)
      • StringBuilder

        public StringBuilder(String string)
    • Method Detail

      • append

        public StringBuilder append(char[] chars)
        Description copied from class: StringBuffer
        Adds the character array to the end of this buffer.
        Overrides:
        append in class StringBuffer
        Parameters:
        chars - the character array to append.
        Returns:
        this StringBuffer.
      • append

        public StringBuilder append(char[] chars,
                           int offset,
                           int length)
        Description copied from class: StringBuffer
        Adds the specified sequence of characters to the end of this buffer.
        Overrides:
        append in class StringBuffer
        Parameters:
        chars - the character array to append.
        length - the number of characters.
        Returns:
        this StringBuffer.
      • append

        public StringBuilder append(String string)
        Description copied from class: StringBuffer
        Adds the specified string to the end of this buffer.

        If the specified string is null the string "null" is appended, otherwise the contents of the specified string is appended.

        Overrides:
        append in class StringBuffer
        Parameters:
        string - the string to append (may be null).
        Returns:
        this StringBuffer.
      • append

        public StringBuilder append(Object obj)
        Description copied from class: StringBuffer
        Adds the string representation of the specified object to the end of this StringBuffer.

        If the specified object is null the string "null" is appended, otherwise the objects toString is used to get its string representation.

        Overrides:
        append in class StringBuffer
        Parameters:
        obj - the object to append (may be null).
        Returns:
        this StringBuffer.
        See Also:
        String.valueOf(Object)
      • append

        public StringBuilder append(boolean b)
        Description copied from class: StringBuffer
        Adds the string representation of the specified boolean to the end of this StringBuffer.

        If the argument is true the string "true" is appended, otherwise the string "false" is appended.

        Overrides:
        append in class StringBuffer
        Parameters:
        b - the boolean to append.
        Returns:
        this StringBuffer.
        See Also:
        String.valueOf(boolean)