title: Java equivalent of c# String.IsNullOrEmpty() and String.IsNullOrWhiteSpace()
body: <p>Working in c# i've found very useful two static methods of the String class : </p>
  
  <ul>
  <li><a href="http://msdn.microsoft.com/en-us/library/system.string.isnullorempty.aspx">IsNullOrEmpty()</a> </li>
  <li><a href="http://msdn.microsoft.com/en-us/library/system.string.isnullorwhitespace.aspx">IsNullOrWhiteSpace()</a></li>
  </ul>
  
  <p>i can't find a valid surrogate in Java, is there something similar ? </p>
  
  <p>Actually i have translated the two methods in this way : </p>
  
  <pre><code>public static boolean isNullOrEmpty(String a) {
  return a == null || a.isEmpty();
  } 
  
  public static boolean isNullOrWhiteSpace(String a) {
  return a == null || (a.length() &gt; 0 &amp;&amp; a.trim().length() &lt;= 0);
  }
  </code></pre>
  
  <p>Is this the best way to translate these methods in Java ?
  What is the best way to translate these two methods in Java ?</p>