ICU-3779 debug clean up

X-SVN-Rev: 15629
This commit is contained in:
Doug Felt 2004-05-28 22:55:17 +00:00
parent 8dc1013b7e
commit 3c3f90ac70

View File

@ -161,40 +161,43 @@ final class DigitList {
*/
public BigInteger getBigInteger(boolean isPositive) {
if (isZero()) return BigInteger.valueOf(0);
// StringBuffer stringRep = new StringBuffer(count);
// if (!isPositive) {
// stringRep.append('-');
// }
// for (int i=0; i<count; ++i) {
// stringRep.append((char) digits[i]);
// }
// int d = decimalAt;
// while (d-- > count) {
// stringRep.append('0');
// }
// return new BigInteger(stringRep.toString());
int len = decimalAt > count ? decimalAt : count;
if (!isPositive) {
len += 1;
}
char[] text = new char[len];
int n = 0;
if (!isPositive) {
text[0] = '-';
for (int i = 0; i < count; ++i) {
text[i+1] = (char)digits[i];
if (false) {
StringBuffer stringRep = new StringBuffer(count);
if (!isPositive) {
stringRep.append('-');
}
n = count+1;
for (int i=0; i<count; ++i) {
stringRep.append((char) digits[i]);
}
int d = decimalAt;
while (d-- > count) {
stringRep.append('0');
}
return new BigInteger(stringRep.toString());
} else {
for (int i = 0; i < count; ++i) {
text[i] = (char)digits[i];
int len = decimalAt > count ? decimalAt : count;
if (!isPositive) {
len += 1;
}
n = count;
char[] text = new char[len];
int n = 0;
if (!isPositive) {
text[0] = '-';
for (int i = 0; i < count; ++i) {
text[i+1] = (char)digits[i];
}
n = count+1;
} else {
for (int i = 0; i < count; ++i) {
text[i] = (char)digits[i];
}
n = count;
}
for (int i = n; i < text.length; ++i) {
text[i] = '0';
}
return new BigInteger(new String(text));
}
for (int i = n; i < text.length; ++i) {
text[i] = '0';
}
return new BigInteger(new String(text));
}
/**