// an array to keep track of distinct numbers are already converted
NumberArray usedNumbers = new NumberArray(pNumChar);
usedNumbers.deassignArray();
for (int iw = 0; iw < pNumChar; iw++) {
MesquiteNumber aNumber = new MesquiteNumber();
MesquiteNumber secondNumber = new MesquiteNumber();
pNumSpecsSet.placeValue(iw, aNumber);
// bypass this char if the number is already converted
if (usedNumbers.findValue(aNumber) < 0) {
int continuing = 1;
ColumnRangeConvertHelper aHelper = new ColumnRangeConvertHelper();
aHelper.setNumber(aNumber);
int startIndex = CharacterStates.toExternal(iw);
ColumnRange range = new ColumnRange();
range.setStartColIndex(startIndex - 1);
for (int ic = iw + 1; ic < pNumChar; ic = ic + 1) {
pNumSpecsSet.placeValue(ic, secondNumber);
if (secondNumber.equals(aNumber)) {
if (continuing == 0) {
// discontinue
range = new ColumnRange();
range.setStartColIndex(ic);