|
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectsun.text.normalizer.ReplaceableString
public class ReplaceableString
ReplaceableString is an adapter class that implements the
Replaceable API around an ordinary StringBuffer.
Note: This class does not support attributes and is not
intended for general use. Most clients will need to implement
Replaceable in their text representation class.
Copyright © IBM Corporation 1999. All rights reserved.
Replaceable| Constructor Summary | |
|---|---|
ReplaceableString(String str)
Construct a new object with the given initial contents. |
|
ReplaceableString(StringBuffer buf)
Construct a new object using buf for internal
storage. |
|
| Method Summary | |
|---|---|
char |
charAt(int offset)
Return the character at the given position in this object. |
void |
getChars(int srcStart,
int srcLimit,
char[] dst,
int dstStart)
Copies characters from this object into the destination character array. |
int |
length()
Return the number of characters contained in this object. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ReplaceableString(String str)
str - initial contentspublic ReplaceableString(StringBuffer buf)
buf for internal
storage. The contents of buf at the time of
construction are used as the initial contents. Note!
Modifications to buf will modify this object, and
vice versa.
buf - object to be used as internal storage| Method Detail |
|---|
public int length()
Replaceable API.
length in interface Replaceablepublic char charAt(int offset)
Replaceable API.
charAt in interface Replaceableoffset - offset into the contents, from 0 to
length() - 1
public void getChars(int srcStart,
int srcLimit,
char[] dst,
int dstStart)
srcStart; the last character to be copied is at
index srcLimit-1 (thus the total number of
characters to be copied is srcLimit-srcStart). The
characters are copied into the subarray of dst
starting at index dstStart and ending at index
dstStart + (srcLimit-srcStart) - 1.
getChars in interface ReplaceablesrcStart - the beginning index to copy, inclusive; 0
<= start <= limit.srcLimit - the ending index to copy, exclusive;
start <= limit <= length().dst - the destination array.dstStart - the start offset in the destination array.
|
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||