|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--net.aerith.misao.util.Format
The Format
is a static class with static methods to
convert number into string in proper format, and methods to
convert string into number.
Constructor Summary | |
Format()
|
Method Summary | |
static double |
doubleValueOf(java.lang.String string)
Converts String into double value. |
static java.lang.String |
formatAngularSize(double width,
double height)
Formats the specified angular values representing the width and height and creates a new String with a proper unit. |
static java.lang.String |
formatDouble(double value,
int figures,
int period)
Formats the double number in specified figures and creates a String . |
private static java.lang.String |
formatDouble(double value,
int figures,
int period,
char padding)
Formats the double number in specified figures and creates a String padding with a specified character. |
static java.lang.String |
formatDoubleZeroPadding(double value,
int figures,
int period)
Formats the double number in specified figures and creates a String with 0 padding. |
static java.lang.String |
formatInt(int value,
int figures)
Formats the integer number in specified figures and creates a String . |
private static java.lang.String |
formatInt(int value,
int figures,
char padding)
Formats the integer number in specified figures and creates a String padding with a specified character. |
static java.lang.String |
formatIntZeroPadding(int value,
int figures)
Formats the integer number in specified figures and creates a String with 0 padding. |
static int |
intValueOf(byte[] b,
int offset,
int bytes)
Converts a byte array into integer value. |
static int |
intValueOf(java.lang.String string)
Converts String into integer value. |
static java.lang.String |
removeSpace(java.lang.String string)
Removes space characters in the specified String . |
static java.lang.String[] |
separatePath(java.lang.String path)
Separates the path string by the system dependent path separator |
Methods inherited from class java.lang.Object |
|
Constructor Detail |
public Format()
Method Detail |
public static java.lang.String formatInt(int value, int figures)
String
.value
- the number to format.figures
- the number of figures of a new string.public static java.lang.String formatIntZeroPadding(int value, int figures)
String
with 0 padding.value
- the number to format.figures
- the number of figures of a new string.private static java.lang.String formatInt(int value, int figures, char padding)
String
padding with a specified character.value
- the number to format.figures
- the number of figures of a new string.padding
- the character for padding.public static java.lang.String formatDouble(double value, int figures, int period)
String
.value
- the number to format.figures
- the number of figures of a new string.period
- the position of period.public static java.lang.String formatDoubleZeroPadding(double value, int figures, int period)
String
with 0 padding.value
- the number to format.figures
- the number of figures of a new string.period
- the position of period.private static java.lang.String formatDouble(double value, int figures, int period, char padding)
String
padding with a specified character.value
- the number to format.figures
- the number of figures of a new string.period
- the position of period.padding
- the character for padding.public static java.lang.String formatAngularSize(double width, double height)
String
with a proper unit.width
- the anglular value of width.height
- the anglular value of height.public static java.lang.String removeSpace(java.lang.String string)
String
.string
- the string where to remove space characters.public static int intValueOf(byte[] b, int offset, int bytes)
b
- the byte array.offset
- the offset index to start the conversion.bytes
- the number of bytes to convert.public static int intValueOf(java.lang.String string)
String
into integer value. If some white
spaces or other letters exist, if positive sign '+' is attached,
if being padded by 0, it does not throw exception and converts
a proper value.string
- the string to convert into integer value.public static double doubleValueOf(java.lang.String string)
String
into double value. This method
can convert exponential style. If some white spaces or other
letters exist, if positive sign '+' is attached, if being
padded by 0, it does not throw exception and converts a
proper value.string
- the string to convert into double value.public static java.lang.String[] separatePath(java.lang.String path)
path
- the path string.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |