org.apache.ignite.internal.util

## Class GridStringBuilder

- java.lang.Object
- - org.apache.ignite.internal.util.GridStringBuilder

All Implemented Interfaces:
  Serializable

Direct Known Subclasses:
  SB

    public class GridStringBuilder
    extends Object
    implements Serializable

Optimized string builder with better API.

See Also:
  Serialized Form

### Constructor Summary

Constructors
Constructor and Description
`GridStringBuilder()`
`GridStringBuilder(CharSequence seq)`
`GridStringBuilder(int cap)`
`GridStringBuilder(String str)`

### Method Summary

Methods
`GridStringBuilder` `a(boolean b)`
`GridStringBuilder` `a(char c)`
`GridStringBuilder` `a(char[] str)`
`GridStringBuilder` `a(char[] str, int offset, int len)`
`GridStringBuilder` `a(CharSequence s)`
`GridStringBuilder` `a(CharSequence s, int start, int end)`
`GridStringBuilder` `a(double d)`
`GridStringBuilder` `a(float f)`
`GridStringBuilder` `a(int i)`
`GridStringBuilder` `a(long lng)`
`GridStringBuilder` `a(Object obj)`
`GridStringBuilder` `a(String str)`
`GridStringBuilder` `a(StringBuffer sb)`
`GridStringBuilder` `appendCodePoint(int codePoint)`
`GridStringBuilder` `appendHex(long val)` Appends given long value as a hex string to this string builder.
`GridStringBuilder` `d(int index)`
`GridStringBuilder` `d(int start, int end)`
`GridStringBuilder` `i(int off, boolean b)`
`GridStringBuilder` `i(int off, char c)`
`GridStringBuilder` `i(int off, char[] str)`
`GridStringBuilder` `i(int index, char[] str, int off, int len)`
`GridStringBuilder` `i(int dstOff, CharSequence s)`
`GridStringBuilder` `i(int dstOff, CharSequence s, int start, int end)`
`GridStringBuilder` `i(int off, double d)`
`GridStringBuilder` `i(int off, float f)`
`GridStringBuilder` `i(int off, int i)`
`GridStringBuilder` `i(int off, long l)`
`GridStringBuilder` `i(int off, Object obj)`
`GridStringBuilder` `i(int off, String str)`
`StringBuilder` `impl()` Gets underlying implementation.
`int` `length()`
`GridStringBuilder` `r(int start, int end, String str)`
`void` `setLength(int len)`
`String` `toString()`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

### Constructor Detail

#### GridStringBuilder

    public GridStringBuilder()

See Also:
  `StringBuilder.StringBuilder()`

#### GridStringBuilder

    public GridStringBuilder(int cap)

Parameters:
  `cap` - Initial capacity.
See Also:
  `StringBuilder.StringBuilder(int)`

#### GridStringBuilder

    public GridStringBuilder(String str)

Parameters:
  `str` - Initial string.
See Also:
  `StringBuilder.StringBuilder(String)`

#### GridStringBuilder

    public GridStringBuilder(CharSequence seq)

Parameters:
  `seq` - Initial character sequence.
See Also:
  `StringBuilder.StringBuilder(CharSequence)`

### Method Detail

#### setLength

    public void setLength(int len)

Parameters:
  `len` - Length to set.

#### impl

    public StringBuilder impl()

Gets underlying implementation.

Returns:
  Underlying implementation.

#### length

    public int length()

Returns:
  Buffer length.

#### a

    public GridStringBuilder a(Object obj)

Parameters:
  `obj` - Element to add.
Returns:
  This buffer for chaining method calls.

#### a

    public GridStringBuilder a(String str)

Parameters:
  `str` - Element to add.
Returns:
  This buffer for chaining method calls.

#### a

    public GridStringBuilder a(StringBuffer sb)

Parameters:
  `sb` - Element to add.
Returns:
  This buffer for chaining method calls.

#### a

    public GridStringBuilder a(CharSequence s)

Parameters:
  `s` - Element to add.
Returns:
  This buffer for chaining method calls.

#### a

    public GridStringBuilder a(CharSequence s,
                      int start,
                      int end)

Parameters:
  `s` - Element to add.
  `start` - Start position.
  `end` - End position.
Returns:
  This buffer for chaining method calls.

#### a

    public GridStringBuilder a(char[] str)

Parameters:
  `str` - Element to add.
Returns:
  This buffer for chaining method calls.

#### a

    public GridStringBuilder a(char[] str,
                      int offset,
                      int len)

Parameters:
  `str` - Element to add.
  `offset` - Start offset.
  `len` - Length.
Returns:
  This buffer for chaining method calls.

#### a

    public GridStringBuilder a(boolean b)

Parameters:
  `b` - Element to add.
Returns:
  This buffer for chaining method calls.

#### a

    public GridStringBuilder a(char c)

Parameters:
  `c` - Element to add.
Returns:
  This buffer for chaining method calls.

#### a

    public GridStringBuilder a(int i)

Parameters:
  `i` - Element to add.
Returns:
  This buffer for chaining method calls.

#### a

    public GridStringBuilder a(long lng)

Parameters:
  `lng` - Element to add.
Returns:
  This buffer for chaining method calls.

#### a

    public GridStringBuilder a(float f)

Parameters:
  `f` - Element to add.
Returns:
  This buffer for chaining method calls.

#### a

    public GridStringBuilder a(double d)

Parameters:
  `d` - Element to add.
Returns:
  This buffer for chaining method calls.

#### appendCodePoint

    public GridStringBuilder appendCodePoint(int codePoint)

Parameters:
  `codePoint` - Element to add.
Returns:
  This buffer for chaining method calls.

#### d

    public GridStringBuilder d(int start,
                      int end)

Parameters:
  `start` - Start position to delete from.
  `end` - End position.
Returns:
  This buffer for chaining method calls.

#### d

    public GridStringBuilder d(int index)

Parameters:
  `index` - Index to delete character at.
Returns:
  This buffer for chaining method calls.

#### r

    public GridStringBuilder r(int start,
                      int end,
                      String str)

Parameters:
  `start` - Start position to replace from.
  `end` - End position.
  `str` - String to replace with.
Returns:
  This buffer for chaining method calls.

#### i

    public GridStringBuilder i(int index,
                      char[] str,
                      int off,
                      int len)

Parameters:
  `index` - Start index to insert to.
  `str` - String to insert.
  `off` - Offset in the string to be inserted.
  `len` - Length of the substring to be inserted.
Returns:
  This buffer for chaining method calls.

#### i

    public GridStringBuilder i(int off,
                      Object obj)

Parameters:
  `off` - Offset to be inserted at.
  `obj` - Object whose string representation to be inserted.
Returns:
  This buffer for chaining method calls.

#### i

    public GridStringBuilder i(int off,
                      String str)

Parameters:
  `off` - Offset to insert at.
  `str` - String to be inserted.
Returns:
  This buffer for chaining method calls.

#### i

    public GridStringBuilder i(int off,
                      char[] str)

Parameters:
  `off` - Offset to insert at.
  `str` - String to be inserted.
Returns:
  This buffer for chaining method calls.

#### i

    public GridStringBuilder i(int dstOff,
                      CharSequence s)

Parameters:
  `dstOff` - Offset to insert at.
  `s` - String to insert.
Returns:
  This buffer for chaining method calls.

#### i

    public GridStringBuilder i(int dstOff,
                      CharSequence s,
                      int start,
                      int end)

Parameters:
  `dstOff` - Offset to insert at.
  `s` - String to insert.
  `start` - Start index to insert from.
  `end` - End index to insert up to.
Returns:
  This buffer for chaining method calls.

#### i

    public GridStringBuilder i(int off,
                      boolean b)

Parameters:
  `off` - Offset to insert at.
  `b` - Element to insert.
Returns:
  This buffer for chaining method calls.

#### i

    public GridStringBuilder i(int off,
                      char c)

Parameters:
  `off` - Offset to insert at.
  `c` - Element to insert.
Returns:
  This buffer for chaining method calls.

#### i

    public GridStringBuilder i(int off,
                      int i)

Parameters:
  `off` - Offset to insert at.
  `i` - Element to insert.
Returns:
  This buffer for chaining method calls.

#### i

    public GridStringBuilder i(int off,
                      long l)

Parameters:
  `off` - Offset to insert at.
  `l` - Element to insert.
Returns:
  This buffer for chaining method calls.

#### i

    public GridStringBuilder i(int off,
                      float f)

Parameters:
  `off` - Offset to insert at.
  `f` - Element to insert.
Returns:
  This buffer for chaining method calls.

#### i

    public GridStringBuilder i(int off,
                      double d)

Parameters:
  `off` - Offset to insert at.
  `d` - Element to insert.
Returns:
  This buffer for chaining method calls.

#### appendHex

    public GridStringBuilder appendHex(long val)

Appends given long value as a hex string to this string builder.

Parameters:
  `val` - Value to append.
Returns:
  This builder for chaining method calls.

#### toString

    public String toString()

Overrides:
  `toString` in class `Object`

2015 Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Fabric | : ver. 1.7.0
Release Date | : August 1 2016