org.LexGrid.util
Class Utility

java.lang.Object
  extended by org.LexGrid.util.Utility

public class Utility
extends java.lang.Object

A couple of utility type methods.

Author:
Dan Armbrust

Constructor Summary
Utility()
           
 
Method Summary
static java.lang.String hashTableToString(java.util.Hashtable hashTable)
          This method is for printing out a hashtable (keys and values).
static java.lang.String hashTableToString(java.util.Hashtable hashTable, java.lang.String[] keysToObscure)
          This method is for printing out a hashtable (keys and values).
static java.lang.String stringArrayToString(java.lang.String[] string)
           
static java.lang.String trim(java.lang.String str)
          method removes the trailing spaces in a string and returns it.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Utility

public Utility()
Method Detail

stringArrayToString

public static java.lang.String stringArrayToString(java.lang.String[] string)

hashTableToString

public static java.lang.String hashTableToString(java.util.Hashtable hashTable,
                                                 java.lang.String[] keysToObscure)
This method is for printing out a hashtable (keys and values). It assumes that the keys are strings.

Parameters:
hashTable - - The hashtable to print
keysToObscure - - If one of the keys is sensitive, like a password, you can have it not be printed.
Returns:
- The String representing the hashtable.

hashTableToString

public static java.lang.String hashTableToString(java.util.Hashtable hashTable)
This method is for printing out a hashtable (keys and values). It works best if the keys and values are strings.

Parameters:
hashTable - - The hashtable to print
Returns:
- The String representing the hashtable.

trim

public static java.lang.String trim(java.lang.String str)
method removes the trailing spaces in a string and returns it. Returns null if str is null.

Parameters:
str -
Returns:
trimmed string

Copyright: (c) 2004-2006 Mayo Foundation for Medical Education and Research (MFMER). All rights reserved. MAYO, MAYO CLINIC, and the triple-shield Mayo logo are trademarks and service marks of MFMER.