org.objectweb.telosys.util
Class NumUtil

java.lang.Object
  extended byorg.objectweb.telosys.util.NumUtil

public final class NumUtil
extends java.lang.Object


Method Summary
static java.lang.String formatInt(int iNbr, int iMinLength)
           
static java.lang.String formatInt(int iNbr, int iLength, boolean bFixedSize, char cAppended)
          Méthode permettant de formater un nombre de type int en le forçant à afficher un nombre donné de caractères.
static java.lang.String formatInt(int iValue, java.lang.String sFormat)
           
static java.lang.String formatInt(int iValue, java.lang.String sFormat, java.lang.String sLanguage)
          Formats an int value using a standard Java format string
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

formatInt

public static java.lang.String formatInt(int iNbr,
                                         int iLength,
                                         boolean bFixedSize,
                                         char cAppended)
Méthode permettant de formater un nombre de type int en le forçant à afficher un nombre donné de caractères.

Parameters:
iNbr - Le nombre de type int à formater
iLength - La taille minimum de ce nombre (nombre de chiffres)
bFixedSize - True si la taille est fixe
cAppended - Le caractère éventuellement ajouté au début de la chaine pour obtenir un nombre en taille fixe (ex: '0' ou ' ')
Returns:
String

formatInt

public static java.lang.String formatInt(int iNbr,
                                         int iMinLength)
Parameters:
iNbr - :
iMinLength - :
Returns:
String :

formatInt

public static java.lang.String formatInt(int iValue,
                                         java.lang.String sFormat,
                                         java.lang.String sLanguage)
Formats an int value using a standard Java format string

Parameters:
iValue - : the value to format
sFormat - : Standard Java ChoiceFormat or DecimalFormat
sLanguage - : ISO Language Code ( ie "fr"=French, "en"=English )
Returns:
: the formated value

formatInt

public static java.lang.String formatInt(int iValue,
                                         java.lang.String sFormat)
Parameters:
iValue - : the value to format
sFormat - : Standard Java ChoiceFormat or DecimalFormat
Returns:
: the formated value