com.im.commons 6.0

com.im.commons.util
Class Utils

java.lang.Object
  extended by com.im.commons.util.Utils

public final class Utils
extends Object


Method Summary
static boolean containsIgnoreCase(Collection<String> vals, String item)
          Does this collection of strings contain the specified item (case is ignored).
static boolean containsIgnoreCase(String[] vals, String item)
          Does this array of strings contain the specified item (case is ignored).
static String convertForPaste(String input)
          Convert all non-space white chars to ',' inside input
static String createGuid()
           
static void pasteOnNonMac(String clip, JTextComponent comp)
          Paste does not work properly with clipboard on non-mac systems
static Double toDoubleOrNull(String val)
           
static Integer toIntegerOrNull(String val)
           
static String xmlToString(Node node)
          Export xml Node to String
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

createGuid

public static String createGuid()

containsIgnoreCase

public static boolean containsIgnoreCase(String[] vals,
                                         String item)
Does this array of strings contain the specified item (case is ignored).


containsIgnoreCase

public static boolean containsIgnoreCase(Collection<String> vals,
                                         String item)
Does this collection of strings contain the specified item (case is ignored).


convertForPaste

public static String convertForPaste(String input)
Convert all non-space white chars to ',' inside input

Parameters:
input - The s tring to paste
Returns:
The comma-separated list of values

pasteOnNonMac

public static void pasteOnNonMac(String clip,
                                 JTextComponent comp)
Paste does not work properly with clipboard on non-mac systems

Parameters:
clip - content to be pasted
comp - component where to paste

toDoubleOrNull

public static Double toDoubleOrNull(String val)

toIntegerOrNull

public static Integer toIntegerOrNull(String val)

xmlToString

public static String xmlToString(Node node)
Export xml Node to String

Parameters:
node - Node to be exported (Document in our case)
Returns:
The document as XML string

com.im.commons 6.0