com.jgoodies.binding
Class BindingUtils

java.lang.Object
  extended by com.jgoodies.binding.BindingUtils

public final class BindingUtils
extends java.lang.Object

Consists exclusively of static methods that provide convenience behavior used by the Binding classes.

Version:
$Revision: 1.7 $
Author:
Karsten Lentzsch

Method Summary
static boolean equals(java.lang.Object o1, java.lang.Object o2)
          Checks and answers if the two objects are both null or equal.
static boolean isBlank(java.lang.String str)
          Checks and answers if the given string is whitespace, empty ("") or null.
static boolean isEmpty(java.lang.String str)
          Checks and answers if the given string is empty ("") or null.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

equals

public static boolean equals(java.lang.Object o1,
                             java.lang.Object o2)
Checks and answers if the two objects are both null or equal.
 #equals(null, null)  == true
 #equals("Hi", "Hi")  == true
 #equals("Hi", null)  == false
 #equals(null, "Hi")  == false
 #equals("Hi", "Ho")  == false
 

Parameters:
o1 - the first object to compare
o2 - the second object to compare
Returns:
boolean true if and only if both objects are null or equal

isBlank

public static boolean isBlank(java.lang.String str)
Checks and answers if the given string is whitespace, empty ("") or null.
 #isBlank(null)  == true
 #isBlank("")    == true
 #isBlank(" ")   == true
 #isBlank("Hi ") == false
 

Parameters:
str - the string to check, may be null
Returns:
true if the string is whitespace, empty or null
See Also:
isEmpty(String)

isEmpty

public static boolean isEmpty(java.lang.String str)
Checks and answers if the given string is empty ("") or null.

 #isEmpty(null)  == true
 #isEmpty("")    == true
 #isEmpty(" ")   == false
 #isEmpty("Hi ") == false
 

Parameters:
str - the string to check, may be null
Returns:
true if the string is empty or null
See Also:
isBlank(String)


Copyright © 2002-2008 JGoodies Karsten Lentzsch. All Rights Reserved.