Simple adjustable-length vector whose elements are 32-bit floats.
Used for the Scheme string type.
FString
public FString(String str)
FString
public FString(StringBuffer buffer)
FString
public FString(StringBuffer buffer,
int offset,
int length)
FString
public FString(char[] values)
Create an FString from a char[].
Note that this contructor does *not* copy the argument.
FString
public FString(char[] buffer,
int offset,
int length)
FString
public FString(CharSeq seq,
int offset,
int length)
FString
public FString(int num)
FString
public FString(int num,
char value)
addAll
public boolean addAll(FString s)
Append all the characters of another FString
.
addAllStrings
public void addAllStrings(Object[] args,
int startIndex)
Append arguments to this FString.
Used to implement Scheme's string-append and string-append/shared.
args
- an array of FString valuestartIndex
- index of first string in args
to use
charAt
public final char charAt(int index)
- charAt in interface CharSeq
charAtBuffer
public final char charAtBuffer(int index)
compareTo
public int compareTo(Object obj)
consumeNext
public boolean consumeNext(int ipos,
Consumer out)
Copy an element specified by a position pair to a Consumer.
- consumeNext in interface SimpleVector
copy
public FString copy(int start,
int end)
fill
public final void fill(char ch)
Set all the elements to a given character.
- fill in interface CharSeq
fill
public void fill(int fromIndex,
int toIndex,
char value)
- fill in interface CharSeq
getChars
public void getChars(StringBuffer dst)
getChars
public void getChars(int srcBegin,
int srcEnd,
StringBuffer dst)
getChars
public void getChars(int srcBegin,
int srcEnd,
dst[] ,
int dstBegin)
length
public int length()
Get length of string, in characters.
Synonym for size(), for compatibility with String and StringBuffer.
- length in interface CharSeq
readExternal
public void readExternal(ObjectInput in)
throws IOException,
ClassNotFoundException
replace
public void replace(int where,
String string)
replace
public void replace(int where,
char[] chars,
int start,
int count)
setCharAt
public void setCharAt(int index,
char ch)
- setCharAt in interface CharSeq
setCharAtBuffer
public void setCharAtBuffer(int index,
char ch)
shift
public void shift(int srcStart,
int dstStart,
int count)
- shift in interface SimpleVector
subSequence
public CharSequence subSequence(int start,
int end)
- subSequence in interface CharSeq
substring
public String substring(int start,
int end)
toCharArray
public char[] toCharArray()
Return a char[] contain the characters of this string.
It is unspecified if the result is a copy or shares with this FString.
writeExternal
public void writeExternal(ObjectOutput out)
throws IOException
writeTo
public void writeTo(int start,
int count,
java.io.Writer dest)
throws java.io.IOException
Write out (part of) this string.
- writeTo in interface CharSeq
start
- index of initial character to writecount
- number of characters to writedest
- where to write the characters
writeTo
public void writeTo(java.io.Writer dest)
throws java.io.IOException
- writeTo in interface CharSeq