proper.util
Class Formatter

java.lang.Object
  extended by proper.util.Formatter

public class Formatter
extends java.lang.Object

A little helper class for formatting.

Version:
$Revision: 1.2 $
Author:
FracPete

Constructor Summary
Formatter()
           
 
Method Summary
static java.lang.String format(int number, int length)
          formats the given number right-aligned with the given length and the filler ' '
static java.lang.String format(int number, int length, boolean right)
          formats the given number either left or right-aligned with the given length and the filler ' '
static java.lang.String format(int number, int length, boolean right, char filler)
          formats the given number either left or right-aligned with the given length and the given filler (e.g.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Formatter

public Formatter()
Method Detail

format

public static java.lang.String format(int number,
                                      int length)
formats the given number right-aligned with the given length and the filler ' '


format

public static java.lang.String format(int number,
                                      int length,
                                      boolean right)
formats the given number either left or right-aligned with the given length and the filler ' '


format

public static java.lang.String format(int number,
                                      int length,
                                      boolean right,
                                      char filler)
formats the given number either left or right-aligned with the given length and the given filler (e.g. ' ' or '0')