|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object gnu.lists.AbstractSequence gnu.lists.SimpleVector gnu.lists.FString
public class FString
Simple adjustable-length vector whose elements are 32-bit floats. Used for the Scheme string type.
Field Summary | |
---|---|
char[] |
data
|
protected static char[] |
empty
|
Fields inherited from class gnu.lists.SimpleVector |
---|
size |
Fields inherited from interface gnu.lists.Sequence |
---|
ATTRIBUTE_VALUE, BOOLEAN_VALUE, CDATA_VALUE, CHAR_VALUE, COMMENT_VALUE, DOCUMENT_VALUE, DOUBLE_VALUE, EOF_VALUE, eofValue, FLOAT_VALUE, GROUP_VALUE, INT_S16_VALUE, INT_S32_VALUE, INT_S64_VALUE, INT_S8_VALUE, INT_U16_VALUE, INT_U32_VALUE, INT_U64_VALUE, INT_U8_VALUE, OBJECT_VALUE, PRIM_VALUE, PROCESSING_INSTRUCTION_VALUE, TEXT_BYTE_VALUE |
Constructor Summary | |
---|---|
FString()
|
|
FString(char[] values)
Create an FString from a char[]. |
|
FString(char[] buffer,
int offset,
int length)
|
|
FString(CharSeq seq)
|
|
FString(CharSeq seq,
int offset,
int length)
|
|
FString(int num)
|
|
FString(int num,
char value)
|
|
FString(Sequence seq)
|
|
FString(java.lang.String str)
|
|
FString(java.lang.StringBuffer buffer)
|
|
FString(java.lang.StringBuffer buffer,
int offset,
int length)
|
Method Summary | |
---|---|
boolean |
addAll(FString s)
Append all the characters of another FString . |
void |
addAllStrings(java.lang.Object[] args,
int startIndex)
Append arguments to this FString. |
FString |
append(char c)
|
FString |
append(java.lang.CharSequence csq)
|
FString |
append(java.lang.CharSequence csq,
int start,
int end)
|
char |
charAt(int index)
|
char |
charAtBuffer(int index)
|
protected void |
clearBuffer(int start,
int count)
|
int |
compareTo(java.lang.Object obj)
|
void |
consume(Consumer out)
|
boolean |
consumeNext(int ipos,
Consumer out)
Copy an element specified by a position pair to a Consumer. |
void |
consumePosRange(int iposStart,
int iposEnd,
Consumer out)
|
FString |
copy(int start,
int end)
|
boolean |
equals(java.lang.Object obj)
|
void |
fill(char ch)
Set all the elements to a given character. |
void |
fill(int fromIndex,
int toIndex,
char value)
|
java.lang.Object |
get(int index)
See java.util.List. |
protected java.lang.Object |
getBuffer()
|
java.lang.Object |
getBuffer(int index)
|
int |
getBufferLength()
Get the allocated length of the data buffer. |
void |
getChars(int srcBegin,
int srcEnd,
char[] dst,
int dstBegin)
Copy characters into a destination buffer. |
void |
getChars(int srcBegin,
int srcEnd,
java.lang.StringBuffer dst)
|
void |
getChars(java.lang.StringBuffer dst)
|
int |
getElementKind()
|
int |
hashCode()
|
int |
length()
Get length of string, in characters. |
void |
readExternal(java.io.ObjectInput in)
|
void |
replace(int where,
char[] chars,
int start,
int count)
|
void |
replace(int where,
java.lang.String string)
|
java.lang.Object |
setBuffer(int index,
java.lang.Object value)
|
void |
setBufferLength(int length)
|
void |
setCharAt(int index,
char ch)
|
void |
setCharAtBuffer(int index,
char ch)
|
void |
shift(int srcStart,
int dstStart,
int count)
|
java.lang.CharSequence |
subSequence(int start,
int end)
|
java.lang.String |
substring(int start,
int end)
|
char[] |
toCharArray()
Return a char[] contain the characters of this string. |
java.lang.String |
toString()
|
void |
writeExternal(java.io.ObjectOutput out)
|
void |
writeTo(java.lang.Appendable dest)
|
void |
writeTo(int start,
int count,
java.lang.Appendable dest)
Append a specified subsequence to an Appendable . |
Methods inherited from class gnu.lists.SimpleVector |
---|
add, add, addAll, addPos, clear, compareToInt, compareToLong, consume, createPos, fill, fill, fillPosRange, getNextKind, getPosNext, getRowMajor, getTag, intAt, intAtBuffer, isAfterPos, longAt, longAtBuffer, nextIndex, nextPos, remove, remove, removeAll, removePos, removePosRange, retainAll, set, setSize, size, transpose |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface gnu.lists.CharSeq |
---|
consume |
Methods inherited from interface gnu.lists.Sequence |
---|
elements, fill, isEmpty, size |
Methods inherited from interface java.util.List |
---|
add, add, addAll, addAll, clear, contains, containsAll, indexOf, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, retainAll, set, subList, toArray, toArray |
Methods inherited from interface gnu.lists.Array |
---|
get, getEffectiveIndex, getLowBound, getSize, isEmpty, rank, set |
Field Detail |
---|
public char[] data
protected static char[] empty
Constructor Detail |
---|
public FString()
public FString(int num)
public FString(int num, char value)
public FString(char[] values)
public FString(java.lang.String str)
public FString(java.lang.StringBuffer buffer)
public FString(java.lang.StringBuffer buffer, int offset, int length)
public FString(char[] buffer, int offset, int length)
public FString(Sequence seq)
public FString(CharSeq seq)
public FString(CharSeq seq, int offset, int length)
Method Detail |
---|
public int length()
CharSeq
length
in interface CharSeq
length
in interface java.lang.CharSequence
public int getBufferLength()
getBufferLength
in class SimpleVector
public void setBufferLength(int length)
setBufferLength
in class SimpleVector
protected java.lang.Object getBuffer()
getBuffer
in class SimpleVector
public final java.lang.Object getBuffer(int index)
getBuffer
in class SimpleVector
public final java.lang.Object setBuffer(int index, java.lang.Object value)
setBuffer
in class SimpleVector
public final java.lang.Object get(int index)
AbstractSequence
get
in interface Sequence
get
in interface java.util.List
get
in class SimpleVector
public final char charAt(int index)
charAt
in interface CharSeq
charAt
in interface java.lang.CharSequence
public final char charAtBuffer(int index)
public void getChars(int srcBegin, int srcEnd, char[] dst, int dstBegin)
CharSeq
getChars
in interface CharSeq
public void getChars(int srcBegin, int srcEnd, java.lang.StringBuffer dst)
public void getChars(java.lang.StringBuffer dst)
public char[] toCharArray()
public void shift(int srcStart, int dstStart, int count)
shift
in class SimpleVector
public FString copy(int start, int end)
public boolean addAll(FString s)
FString
.
public void addAllStrings(java.lang.Object[] args, int startIndex)
args
- an array of FString valuestartIndex
- index of first string in args
to usepublic java.lang.String toString()
toString
in interface CharSeq
toString
in interface java.lang.CharSequence
toString
in class AbstractSequence
public java.lang.String substring(int start, int end)
public java.lang.CharSequence subSequence(int start, int end)
subSequence
in interface CharSeq
subSequence
in interface java.lang.CharSequence
public void setCharAt(int index, char ch)
setCharAt
in interface CharSeq
public void setCharAtBuffer(int index, char ch)
public final void fill(char ch)
fill
in interface CharSeq
public void fill(int fromIndex, int toIndex, char value)
fill
in interface CharSeq
protected void clearBuffer(int start, int count)
clearBuffer
in class SimpleVector
public void replace(int where, char[] chars, int start, int count)
public void replace(int where, java.lang.String string)
public int hashCode()
hashCode
in interface java.util.Collection
hashCode
in interface java.util.List
hashCode
in class AbstractSequence
public boolean equals(java.lang.Object obj)
equals
in interface java.util.Collection
equals
in interface java.util.List
equals
in class AbstractSequence
public int compareTo(java.lang.Object obj)
compareTo
in interface java.lang.Comparable
public int getElementKind()
getElementKind
in class SimpleVector
public void consume(Consumer out)
consume
in interface Consumable
consume
in class AbstractSequence
public boolean consumeNext(int ipos, Consumer out)
AbstractSequence
consumeNext
in class SimpleVector
public void consumePosRange(int iposStart, int iposEnd, Consumer out)
consumePosRange
in class SimpleVector
public FString append(char c)
append
in class AbstractSequence
public FString append(java.lang.CharSequence csq)
append
in class AbstractSequence
public FString append(java.lang.CharSequence csq, int start, int end)
append
in class AbstractSequence
public void writeTo(int start, int count, java.lang.Appendable dest) throws java.io.IOException
CharSeq
Appendable
.
An allowable implementation is:
dest.append(this, start, start+count)
.
Hence implementors of Appendable
should avoid calling
writeTo
- though they can call getChars
.
writeTo
in interface CharSeq
java.io.IOException
public void writeTo(java.lang.Appendable dest) throws java.io.IOException
writeTo
in interface CharSeq
java.io.IOException
public void writeExternal(java.io.ObjectOutput out) throws java.io.IOException
writeExternal
in interface java.io.Externalizable
java.io.IOException
public void readExternal(java.io.ObjectInput in) throws java.io.IOException, java.lang.ClassNotFoundException
readExternal
in interface java.io.Externalizable
java.io.IOException
java.lang.ClassNotFoundException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |