Venice 0.751beta

nz.org.venice.util
Class Converter

java.lang.Object
  extended bynz.org.venice.util.Converter

public class Converter
extends java.lang.Object


Constructor Summary
Converter()
           
 
Method Summary
static java.lang.String dateFormat(java.lang.Integer[] args, int[] lengths, java.lang.String separator)
          Return a formatted string according to format.
static java.lang.String toFixedString(int number, int digits)
          Convert a number to a fixed length string of the given number of digits.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Converter

public Converter()
Method Detail

toFixedString

public static java.lang.String toFixedString(int number,
                                             int digits)
Convert a number to a fixed length string of the given number of digits. E.g. converting 3 to a fixed 4 digit string yields "0003".

Parameters:
number - the number to convert into a string
digits - the fixed number of digits to output
Returns:
the string

dateFormat

public static java.lang.String dateFormat(java.lang.Integer[] args,
                                          int[] lengths,
                                          java.lang.String separator)
Return a formatted string according to format.

Parameters:
args - An array of integers containing data
lengths - An array of ints specifying how long each args should be.
Returns:
a formatted date string

Venice 0.751beta