View Javadoc

1   package org.catacomb.interlish.lang;
2   
3   
4   public class U {
5   
6   
7   
8       public static boolean isBlank(String s) {
9           return (s == null || s.length() == 0);
10      }
11  
12      public static boolean eitherIsBlank(String s1, String s2) {
13          return (isBlank(s1) || isBlank(s2));
14      }
15  
16  
17      public static boolean differ(Object s1, Object s2) {
18          return !same(s1, s2);
19      }
20  
21      public static boolean same(Object s1, Object s2) {
22          return ((s1 == null && s2 == null) || s1.equals(s2));
23      }
24  
25  
26  
27  }