Improved performance (I suppose).

This commit is contained in:
dchandler 2003-06-03 23:49:34 +00:00
parent 7d768c9e06
commit d45f5ab8c8

View file

@ -68,12 +68,16 @@ public class DuffData {
you call setData or manipulate the public fields. */
public DuffData() { }
/** here for efficiency */
private static char[] chars = new char[1];
/** Changes the text and font this DuffData represents.
* @param c a character of TibetanMachineWeb or TibetanMachine text
* @param i a TibetanMachineWeb or TibetanMachine font number
*/
public void setData(char c, int i) {
text = new String(new char[] { c });
chars[0] = c;
text = new String(chars);
font = i;
}
}