_format = format;
    protected void setFormatting(String format, String lang, String letterValue,				 String groupSep, String groupSize) {	_lang = lang;	_format = format;	_groupSep = groupSep;	_letterValue = letterValue;	try {	    _groupSize = Integer.parseInt(groupSize);	}	catch (NumberFormatException e) {	    _groupSize = 0;	}	final int length = _format.length();	boolean isFirst = true;	separFirst = true;	separLast = false;        separToks = new Vector();        formatToks = new Vector();	/* 	 * Tokenize the format string into alphanumeric and non-alphanumeric	 * tokens as described in M. Kay page 241.	 */	for (int j = 0, i = 0; i < length;) {            char c = _format.charAt(i);            for (j = i; Character.isLetterOrDigit(c);) {                if (++i == length) break;		c = _format.charAt(i);            }            if (i > j) {                if (isFirst) {                    separToks.addElement(".");                    isFirst = separFirst = false;                }                formatToks.addElement(_format.substring(j, i));            }            if (i == length) break;            c = _format.charAt(i);            for (j = i; !Character.isLetterOrDigit(c);) {                if (++i == length) break;                c = _format.charAt(i);                isFirst = false;            }            if (i > j) {                separToks.addElement(_format.substring(j, i));            }        }	nSepars = separToks.size();	nFormats = formatToks.size(); 	if (nSepars > nFormats) separLast = true;	if (separFirst) nSepars--;	if (separLast) nSepars--;	if (nSepars == 0) {	    separToks.insertElementAt(".", 1); 	    nSepars++;	}	if (separFirst) nSepars ++;    }