/** * Format method for the d conversion character and * int argument. * * For d format, the flag character '-', means that * the output should be left justified within the * field. The default is to pad with blanks on the * left. A '+' character means that the conversion * will always begin with a sign (+ or -). The * blank flag character means that a non-negative * input will be preceded with a blank. If both a * '+' and a ' ' are specified, the blank flag is * ignored. The '0' flag character implies that * padding to the field width will be done with * zeros instead of blanks. * * The field width is treated as the minimum number * of characters to be printed. The default is to * add no padding. Padding is with blanks by * default. * * The precision, if set, is the minimum number of * digits to appear. Padding is with leading 0s. * @param x the int to format. * @return the formatted String. */ private String printDFormat(int x) { return printDFormat(Integer.toString(x)); }
/** * Format method for the d conversion character and * long argument. * * For d format, the flag character '-', means that * the output should be left justified within the * field. The default is to pad with blanks on the * left. A '+' character means that the conversion * will always begin with a sign (+ or -). The * blank flag character means that a non-negative * input will be preceded with a blank. If both a * '+' and a ' ' are specified, the blank flag is * ignored. The '0' flag character implies that * padding to the field width will be done with * zeros instead of blanks. * * The field width is treated as the minimum number * of characters to be printed. The default is to * add no padding. Padding is with blanks by * default. * * The precision, if set, is the minimum number of * digits to appear. Padding is with leading 0s. * @param x the long to format. * @return the formatted String. */ private String printDFormat(long x) { return printDFormat(Long.toString(x)); }
/** * Format method for the d conversion character and * long argument. * * For d format, the flag character '-', means that * the output should be left justified within the * field. The default is to pad with blanks on the * left. A '+' character means that the conversion * will always begin with a sign (+ or -). The * blank flag character means that a non-negative * input will be preceded with a blank. If both a * '+' and a ' ' are specified, the blank flag is * ignored. The '0' flag character implies that * padding to the field width will be done with * zeros instead of blanks. * * The field width is treated as the minimum number * of characters to be printed. The default is to * add no padding. Padding is with blanks by * default. * * The precision, if set, is the minimum number of * digits to appear. Padding is with leading 0s. * @param x the long to format. * @return the formatted String. */ private String printDFormat(long x) { return printDFormat(Long.toString(x)); }
case 'i': if (m_optionalh) { s2 = printDFormat((short)s); } else if (m_optionall) { s2 = printDFormat((long)s); } else { s2 = printDFormat(s);
case 'i': if (m_optionalh) { s2 = printDFormat((short)s); } else if (m_optionall) { s2 = printDFormat(s); } else { s2 = printDFormat((int)s);
case 'i': if (m_optionalh) { s2 = printDFormat((short)s); } else if (m_optionall) { s2 = printDFormat(s); } else { s2 = printDFormat((int)s);
case 'i': if (m_optionalh) { s2 = printDFormat((short)s); } else if (m_optionall) { s2 = printDFormat((long)s); } else { s2 = printDFormat(s);
/** * Format method for the d conversion character and * int argument. * * For d format, the flag character '-', means that * the output should be left justified within the * field. The default is to pad with blanks on the * left. A '+' character means that the conversion * will always begin with a sign (+ or -). The * blank flag character means that a non-negative * input will be preceded with a blank. If both a * '+' and a ' ' are specified, the blank flag is * ignored. The '0' flag character implies that * padding to the field width will be done with * zeros instead of blanks. * * The field width is treated as the minimum number * of characters to be printed. The default is to * add no padding. Padding is with blanks by * default. * * The precision, if set, is the minimum number of * digits to appear. Padding is with leading 0s. * @param x the int to format. * @return the formatted String. */ private String printDFormat(int x) { return printDFormat(Integer.toString(x)); }
/** * Format method for the d conversion specifer and * short argument. * * For d format, the flag character '-', means that * the output should be left justified within the * field. The default is to pad with blanks on the * left. A '+' character means that the conversion * will always begin with a sign (+ or -). The * blank flag character means that a non-negative * input will be preceded with a blank. If both a * '+' and a ' ' are specified, the blank flag is * ignored. The '0' flag character implies that * padding to the field width will be done with * zeros instead of blanks. * * The field width is treated as the minimum number * of characters to be printed. The default is to * add no padding. Padding is with blanks by * default. * * The precision, if set, is the minimum number of * digits to appear. Padding is with leading 0s. * @param x the short to format. * @return the formatted String. */ private String printDFormat(short x) { return printDFormat(Short.toString(x)); }
/** * Format method for the d conversion specifer and * short argument. * * For d format, the flag character '-', means that * the output should be left justified within the * field. The default is to pad with blanks on the * left. A '+' character means that the conversion * will always begin with a sign (+ or -). The * blank flag character means that a non-negative * input will be preceded with a blank. If both a * '+' and a ' ' are specified, the blank flag is * ignored. The '0' flag character implies that * padding to the field width will be done with * zeros instead of blanks. * * The field width is treated as the minimum number * of characters to be printed. The default is to * add no padding. Padding is with blanks by * default. * * The precision, if set, is the minimum number of * digits to appear. Padding is with leading 0s. * @param x the short to format. * @return the formatted String. */ private String printDFormat(short x) { return printDFormat(Short.toString(x)); }