The list of methods to do Integer Format are organized into topic(s).
double
convertInt2Percent(int num) convert Int Percent
DecimalFormat decimalFormat = new DecimalFormat("0.00");
String ret = decimalFormat.format(Double.valueOf("0." + num));
return Double.valueOf(ret);
String
format(int c) Format character for debugging output, which it is prefixed with "0x", padded left with '0' and either 4 or 6 hex characters in width according to whether it is in the BMP or not.
if (c < 1114112) {
return "0x" + padLeft(Integer.toString(c, 16), (c < 65536) ? 4 : 6, '0');
} else {
return "!NOT A CHARACTER!";
String
format(int intval) format
String formatted = Integer.toHexString(intval);
StringBuffer buf = new StringBuffer("00000000");
buf.replace(8 - formatted.length(), 8, formatted);
return buf.toString();
String
format(int ticks) format
int hours = ticks / 216000;
int minutes = ticks / 3600 % 60;
int seconds = ticks / 60 % 60;
int frames = ticks % 60;
SB.setLength(0);
if (hours < 10) {
SB.append('0');
SB.append(hours);
SB.append(':');
if (minutes < 10) {
SB.append('0');
SB.append(minutes);
SB.append(':');
if (seconds < 10) {
SB.append('0');
SB.append(seconds);
SB.append(':');
if (frames < 10) {
SB.append('0');
SB.append(frames);
return SB.toString();