org.apache.lucene.analysis.util
Class OpenStringBuilder
java.lang.Object
org.apache.lucene.analysis.util.OpenStringBuilder
- All Implemented Interfaces:
- Appendable, CharSequence
public class OpenStringBuilder
- extends Object
- implements Appendable, CharSequence
A StringBuilder that allows one to access the array.
Field Summary |
protected char[] |
buf
|
protected int |
len
|
buf
protected char[] buf
len
protected int len
OpenStringBuilder
public OpenStringBuilder()
OpenStringBuilder
public OpenStringBuilder(int size)
OpenStringBuilder
public OpenStringBuilder(char[] arr,
int len)
setLength
public void setLength(int len)
set
public void set(char[] arr,
int end)
getArray
public char[] getArray()
size
public int size()
length
public int length()
- Specified by:
length
in interface CharSequence
capacity
public int capacity()
append
public Appendable append(CharSequence csq)
- Specified by:
append
in interface Appendable
append
public Appendable append(CharSequence csq,
int start,
int end)
- Specified by:
append
in interface Appendable
append
public Appendable append(char c)
- Specified by:
append
in interface Appendable
charAt
public char charAt(int index)
- Specified by:
charAt
in interface CharSequence
setCharAt
public void setCharAt(int index,
char ch)
subSequence
public CharSequence subSequence(int start,
int end)
- Specified by:
subSequence
in interface CharSequence
unsafeWrite
public void unsafeWrite(char b)
unsafeWrite
public void unsafeWrite(int b)
unsafeWrite
public void unsafeWrite(char[] b,
int off,
int len)
resize
protected void resize(int len)
reserve
public void reserve(int num)
write
public void write(char b)
write
public void write(int b)
write
public final void write(char[] b)
write
public void write(char[] b,
int off,
int len)
write
public final void write(OpenStringBuilder arr)
write
public void write(String s)
flush
public void flush()
reset
public final void reset()
toCharArray
public char[] toCharArray()
toString
public String toString()
- Specified by:
toString
in interface CharSequence
- Overrides:
toString
in class Object
Copyright © 2000-2011 Apache Software Foundation. All Rights Reserved.