net.sf.jfilesync.util
Class TStringTool

java.lang.Object
  extended by net.sf.jfilesync.util.TStringTool

public class TStringTool
extends java.lang.Object

Author:
sascha

Field Summary
private static java.text.NumberFormat format
           
 
Constructor Summary
TStringTool()
           
 
Method Summary
static java.lang.String formatDouble(double d, int fractionDigits)
           
static java.lang.String formatDouble(double d, int fractionDigits, int length)
          This method formats a double value according to the specification of a string length.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

format

private static java.text.NumberFormat format
Constructor Detail

TStringTool

public TStringTool()
Method Detail

formatDouble

public static java.lang.String formatDouble(double d,
                                            int fractionDigits,
                                            int length)
This method formats a double value according to the specification of a string length. It can be used to get fixed length strings of doubles.

Parameters:
d - double value
fractionDigits - number of fraction digits
length - fixed length of output string
Returns:
formatted string

formatDouble

public static java.lang.String formatDouble(double d,
                                            int fractionDigits)