Package org.apache.ignite.internal.util
Class GridStringBuilder
java.lang.Object
org.apache.ignite.internal.util.GridStringBuilder
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
SBLimitedLength
Optimized string builder with better API.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiona(boolean b) a(char c) a(char[] str) a(char[] str, int offset, int len) a(double d) a(float f) a(int i) a(long lng) a(CharSequence s) a(CharSequence s, int start, int end) a(StringBuffer sb) appendCodePoint(int codePoint) appendHex(int val) Appends given long value as a hex string to this string builder.appendHex(long val) Appends given long value as a hex string to this string builder.d(int index) d(int start, int end) i(int off, boolean b) i(int off, char c) i(int off, char[] str) i(int index, char[] str, int off, int len) i(int off, double d) i(int off, float f) i(int off, int i) i(int off, long l) i(int dstOff, CharSequence s) i(int dstOff, CharSequence s, int start, int end) impl()Gets underlying implementation.intlength()nl()Adds a platform-dependent newline to this buffer.voidsetLength(int len) toString()
-
Constructor Details
-
GridStringBuilder
public GridStringBuilder()- See Also:
-
GridStringBuilder
public GridStringBuilder(int cap) - Parameters:
cap- Initial capacity.- See Also:
-
GridStringBuilder
- Parameters:
str- Initial string.- See Also:
-
GridStringBuilder
- Parameters:
seq- Initial character sequence.- See Also:
-
-
Method Details
-
setLength
public void setLength(int len) - Parameters:
len- Length to set.
-
impl
Gets underlying implementation.- Returns:
- Underlying implementation.
-
length
public int length()- Returns:
- Buffer length.
-
a
- Parameters:
obj- Element to add.- Returns:
- This buffer for chaining method calls.
-
a
- Parameters:
str- Element to add.- Returns:
- This buffer for chaining method calls.
-
a
- Parameters:
sb- Element to add.- Returns:
- This buffer for chaining method calls.
-
a
- Parameters:
s- Element to add.- Returns:
- This buffer for chaining method calls.
-
a
- Parameters:
s- Element to add.start- Start position.end- End position.- Returns:
- This buffer for chaining method calls.
-
a
- Parameters:
str- Element to add.- Returns:
- This buffer for chaining method calls.
-
a
- Parameters:
str- Element to add.offset- Start offset.len- Length.- Returns:
- This buffer for chaining method calls.
-
a
- Parameters:
b- Element to add.- Returns:
- This buffer for chaining method calls.
-
a
- Parameters:
c- Element to add.- Returns:
- This buffer for chaining method calls.
-
a
- Parameters:
i- Element to add.- Returns:
- This buffer for chaining method calls.
-
a
- Parameters:
lng- Element to add.- Returns:
- This buffer for chaining method calls.
-
a
- Parameters:
f- Element to add.- Returns:
- This buffer for chaining method calls.
-
a
- Parameters:
d- Element to add.- Returns:
- This buffer for chaining method calls.
-
appendCodePoint
- Parameters:
codePoint- Element to add.- Returns:
- This buffer for chaining method calls.
-
d
- Parameters:
start- Start position to delete from.end- End position.- Returns:
- This buffer for chaining method calls.
-
d
- Parameters:
index- Index to delete character at.- Returns:
- This buffer for chaining method calls.
-
nl
Adds a platform-dependent newline to this buffer.- Returns:
- This buffer for chaining method calls.
-
r
- Parameters:
start- Start position to replace from.end- End position.str- String to replace with.- Returns:
- This buffer for chaining method calls.
-
i
- 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
- Parameters:
off- Offset to be inserted at.obj- Object whose string representation to be inserted.- Returns:
- This buffer for chaining method calls.
-
i
- Parameters:
off- Offset to insert at.str- String to be inserted.- Returns:
- This buffer for chaining method calls.
-
i
- Parameters:
off- Offset to insert at.str- String to be inserted.- Returns:
- This buffer for chaining method calls.
-
i
- Parameters:
dstOff- Offset to insert at.s- String to insert.- Returns:
- This buffer for chaining method calls.
-
i
- 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
- Parameters:
off- Offset to insert at.b- Element to insert.- Returns:
- This buffer for chaining method calls.
-
i
- Parameters:
off- Offset to insert at.c- Element to insert.- Returns:
- This buffer for chaining method calls.
-
i
- Parameters:
off- Offset to insert at.i- Element to insert.- Returns:
- This buffer for chaining method calls.
-
i
- Parameters:
off- Offset to insert at.l- Element to insert.- Returns:
- This buffer for chaining method calls.
-
i
- Parameters:
off- Offset to insert at.f- Element to insert.- Returns:
- This buffer for chaining method calls.
-
i
- Parameters:
off- Offset to insert at.d- Element to insert.- Returns:
- This buffer for chaining method calls.
-
appendHex
Appends given long value as a hex string to this string builder.- Parameters:
val- Value to append.- Returns:
- This builder for chaining method calls.
-
appendHex
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
-