1 |
/* ChoiceFormat.java -- Format over a range of numbers |
/* ChoiceFormat.java -- Format over a range of numbers |
2 |
Copyright (C) 1998, 1999, 2000, 2001 Free Software Foundation, Inc. |
Copyright (C) 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc. |
3 |
|
|
4 |
This file is part of GNU Classpath. |
This file is part of GNU Classpath. |
5 |
|
|
259 |
if (choiceLimits.length == 0) |
if (choiceLimits.length == 0) |
260 |
return appendBuf; |
return appendBuf; |
261 |
|
|
262 |
int index = 0; |
int index = 0; |
263 |
if (! Double.isNaN(num) && num >= choiceLimits[0]) |
if (! Double.isNaN(num) && num >= choiceLimits[0]) |
264 |
{ |
{ |
265 |
for (; index < choiceLimits.length - 1; ++index) |
for (; index < choiceLimits.length - 1; ++index) |
266 |
{ |
{ |
267 |
if (choiceLimits[index] <= num |
if (choiceLimits[index] <= num && num < choiceLimits[index + 1]) |
|
&& index != choiceLimits.length - 2 |
|
|
&& num < choiceLimits[index + 1]) |
|
268 |
break; |
break; |
269 |
} |
} |
270 |
} |
} |