pop.utilities
Class Justify

java.lang.Object
  |
  +--pop.utilities.Justify

public class Justify
extends java.lang.Object

Used mostly to right justify numbers in strings of fixed length.


Constructor Summary
Justify()
           
 
Method Summary
static java.lang.String right(double number, int size)
          Returns string of length size with the number right justified in it.
static java.lang.String right(int number, int size)
          Returns string of length size with the number right justified in it.
static java.lang.String right(java.lang.String s, int size)
          Returns new string of length size with the string parameter right justified in it.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Justify

public Justify()
Method Detail

right

public static java.lang.String right(int number,
                                     int size)
Returns string of length size with the number right justified in it. The string is filled with '#' if it is too large for the space.

right

public static java.lang.String right(double number,
                                     int size)
Returns string of length size with the number right justified in it. The string is filled with '#' if it is too large for the space.

right

public static java.lang.String right(java.lang.String s,
                                     int size)
Returns new string of length size with the string parameter right justified in it.