|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sf.asyncobjects.io.TextData
public class TextData
A textual data batch. It has fast concat access and iteration but slow
charAt(int)
.
Field Summary | |
---|---|
static TextData |
EMPTY
empty text data |
Method Summary | |
---|---|
char |
charAt(int index)
|
int |
compareTo(TextData o)
Compare text data |
static TextData |
concat(TextData... toConcat)
Concatenate text data |
TextData |
concat(TextData data)
Concatenate |
TextData |
drop(int n)
Get new data with first n elements dropped |
static TextData |
empty()
|
boolean |
equals(Object obj)
|
TextData |
flatten()
|
static TextData |
fromStrings(String... strings)
Create text data from sequence of strings |
static TextData |
get(CharBuffer cb)
Get text data from character buffer |
int |
hashCode()
Implemetned like String.hashCode() |
TextData |
head(int n)
Get data with first n elements |
boolean |
isEmpty()
|
CharacterIterator |
iterator()
|
int |
length()
|
Promise<TextData> |
promise()
Return a promise that wraps this value |
TextData |
put(CharBuffer cb)
Put data to character buffer |
TextData |
subrange(int start,
int end)
Get subrange of data |
TextData |
subSequence(int start,
int end)
|
String |
toString()
|
String[] |
toStrings()
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final TextData EMPTY
Method Detail |
---|
public static TextData concat(TextData... toConcat)
toConcat
- data to concat
public static TextData fromStrings(String... strings)
strings
- a data to create
public static TextData empty()
public boolean isEmpty()
isEmpty
in interface BatchedData<TextData>
public char charAt(int index)
charAt
in interface CharSequence
CharSequence.charAt(int)
public int length()
length
in interface CharSequence
length
in interface BatchedData<TextData>
CharSequence.length()
public TextData subSequence(int start, int end)
subSequence
in interface CharSequence
CharSequence.subSequence(int, int)
public TextData concat(TextData data)
concat
in interface BatchedData<TextData>
data
- a text data to concat with
BatchedData.concat(net.sf.asyncobjects.io.BatchedData)
public TextData drop(int n)
BatchedData
drop
in interface BatchedData<TextData>
n
- cut point
BatchedData.drop(int)
public TextData head(int n)
BatchedData
head
in interface BatchedData<TextData>
n
- amount to cut from beginning of the data
BatchedData.head(int)
public TextData subrange(int start, int end)
BatchedData
subrange
in interface BatchedData<TextData>
start
- a start posiionend
- a limit
BatchedData.subrange(int, int)
public CharacterIterator iterator()
public int compareTo(TextData o)
compareTo
in interface Comparable<TextData>
o
- compare to
Comparable.compareTo(java.lang.Object)
public Promise<TextData> promise()
BatchedData
promise
in interface BatchedData<TextData>
BatchedData.promise()
public boolean equals(Object obj)
equals
in class Object
Object.equals(java.lang.Object)
public int hashCode()
String.hashCode()
hashCode
in class Object
Object.hashCode()
public TextData put(CharBuffer cb)
cb
- a char buffer to use
public static TextData get(CharBuffer cb)
cb
- a character buffer
public String[] toStrings()
public String toString()
toString
in interface CharSequence
toString
in class Object
Object.toString()
public TextData flatten()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |