pt.digitalis.sampleApp.util
Class Utilities

java.lang.Object
  extended by pt.digitalis.sampleApp.util.Utilities

public class Utilities
extends Object

Author:
Pedro Viegas pviegas@digitalis.pt

Constructor Summary
Utilities()
           
 
Method Summary
static String fillLeft(String str, int size)
          Formats the given string in a number of fixed characters
static String fillLeft(String str, int size, String fillPattern)
          Formats the given string in a number of fixed characters
static String fillRight(String str, int size)
          Formats the given string in a number of fixed characters
static String fillRight(String str, int size, String fillPattern)
          Formats the given string in a number of fixed characters
static String logMemoryMessage()
          Logs the current memory usage
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Utilities

public Utilities()
Method Detail

logMemoryMessage

public static String logMemoryMessage()
Logs the current memory usage

Returns:
the message with the memory info

fillRight

public static String fillRight(String str,
                               int size)
Formats the given string in a number of fixed characters

Parameters:
str - the string to format
size - the size to obtain
Returns:
the formatted string

fillRight

public static String fillRight(String str,
                               int size,
                               String fillPattern)
Formats the given string in a number of fixed characters

Parameters:
str - the string to format
size - the size to obtain
fillPattern - the pattern string to use for filling
Returns:
the formatted string

fillLeft

public static String fillLeft(String str,
                              int size)
Formats the given string in a number of fixed characters

Parameters:
str - the string to format
size - the size to obtain
Returns:
the formatted string

fillLeft

public static String fillLeft(String str,
                              int size,
                              String fillPattern)
Formats the given string in a number of fixed characters

Parameters:
str - the string to format
size - the size to obtain
fillPattern - the pattern string to use for filling
Returns:
the formatted string


Copyright © 2009 Digitalis Informática Lda. All Rights Reserved.