@Test public void testEq() { isTrue(U.eq("2", "2")); isFalse(U.eq("2", "3")); isTrue(U.eq("2", "2")); isFalse(U.eq("a", "b")); isFalse(U.eq('a', 'b')); isFalse(U.eq(null, 'b')); isFalse(U.eq('a', null)); isTrue(U.eq(null, null)); }
public static boolean eq(Object a, Object b) { return a == null ? b == null : a.equals(b); }
U extends RapidoidThing { public static boolean eq(Object a, Object b) { return a == null ? b == null : a.equals(b); } }
U extends RapidoidThing { public static boolean eq(Object a, Object b) { return a == null ? b == null : a.equals(b); }  }
U extends RapidoidThing { public static boolean eq(Object a, Object b) { return a == null ? b == null : a.equals(b); }  @SuppressWarnings("ImplicitArrayToString") static String str(Object obj); static String str(Object[] objs); static String str(Iterable<Object> coll); static String str(Iterator<?> it); static String frmt(String format, Object... args); static void print(Object... values); @SuppressWarnings({"varargs"}) static String join(String sep, T... items); static String join(String sep, Iterable<?> items); static String join(String sep, char[][] items); static Iterator<T> iterator(T[] arr); @SuppressWarnings({"varargs"}) static T[] array(T... items); @SuppressWarnings("unchecked") static T[] arrayOf(Class<T> type, T... elements); @SuppressWarnings("unchecked") static T[] arrayOf(Class<T> type, Iterable<? extends T> items); @SuppressWarnings("unchecked") static T[] arrayOf(Iterable<? extends T> items); static Object[] array(Iterable<?> items); static Set<T> set(); static Set<T> set(Iterable<? extends T> values); @SuppressWarnings({"varargs"}) static Set<T> set(T... values); static List<T> list(); static List<T> list(Iterable<? extends T> values); @SuppressWarnings({"varargs"}) static List<T> list(T... values); static Map<K, V> map(); static Map<K, V> map(Map<? extends K, ? extends V> src); static Map<K, V> map(K key, V value); static Map<K, V> map(K key1, V value1, K key2, V value2); static Map<K, V> map(K key1, V value1, K key2, V value2, K key3, V value3); static Map<K, V> map(K key1, V value1, K key2, V value2, K key3, V value3, K key4, V value4); static Map<K, V> map(K key1, V value1, K key2, V value2, K key3, V value3, K key4, V value4, K key5,
                                       V value5); @SuppressWarnings("unchecked") static Map<K, V> map(Object... keysAndValues); static T or(T value, T fallback); static T or(T value, T fallback1, T fallback2); static T or(T value, T fallback1, T fallback2, T fallback3); static String safe(String s); static boolean safe(Boolean b); static int safe(Integer num); static long safe(Long num); static byte safe(Byte num); static float safe(Float num); static double safe(Double num); static Object[] safe(Object[] arr); static List<T> safe(List<T> list); static Set<T> safe(Set<T> set); static Collection<T> safe(Collection<T> coll); static Map<K, V> safe(Map<K, V> map); static long time(); static boolean timedOut(long since, long timeout); static boolean eq(Object a, Object b); static boolean neq(Object a, Object b); static RuntimeException rte(String message); static RuntimeException rte(String message, Throwable cause); static RuntimeException rte(Throwable cause); static RuntimeException rte(String message, Object... args); static RuntimeException rte(String message, Throwable cause, Object... args); static IllegalArgumentException illegal(String message, Object... args); static boolean must(boolean expectedCondition, String message); static boolean must(boolean expectedCondition); static boolean must(boolean expectedCondition, String message, long arg); static boolean must(boolean expectedCondition, String message, Object arg); static boolean must(boolean expectedCondition, String message, Object arg1, Object arg2); static boolean must(boolean expectedCondition, String message, Object arg1, Object arg2, Object arg3); static T notNull(T value, String msgOrDesc, Object... descArgs); static boolean isEmpty(String value); static boolean isEmpty(Object[] arr); static boolean isEmpty(Collection<?> coll); static boolean isEmpty(Iterable<?> iter); static boolean isEmpty(Map<?, ?> map); static boolean isEmpty(Object value); static boolean notEmpty(String value); static boolean notEmpty(Object[] arr); static boolean notEmpty(Collection<?> coll); static boolean notEmpty(Iterable<?> iter); static boolean notEmpty(Map<?, ?> map); static boolean notEmpty(Object value); static int num(String s); static boolean bool(Object o); static int limit(int min, int value, int max); static long limit(long min, long value, long max); static T single(Iterable<T> coll); static T singleOrNone(Iterable<T> coll); static T first(T[] values); static T first(List<T> values); static T last(T[] values); static T last(List<T> values); @SuppressWarnings("unchecked") static int compare(T val1, T val2); static void sleep(long millis); @SuppressWarnings("unchecked") static T cast(Object value); static List<List<T>> groupsOf(int groupSize, Iterable<T> items); static List<List<T>> groupsOf(int groupSize, T... items); }
U extends RapidoidThing { public static boolean eq(Object a, Object b) { return a == null ? b == null : a.equals(b); }  @SuppressWarnings("ImplicitArrayToString") static String str(Object obj); static String str(Object[] objs); static String str(Iterable<Object> coll); static String str(Iterator<?> it); static String frmt(String format, Object... args); static void print(Object... values); @SuppressWarnings({"varargs"}) static String join(String sep, T... items); static String join(String sep, Iterable<?> items); static String join(String sep, char[][] items); static Iterator<T> iterator(T[] arr); @SuppressWarnings({"varargs"}) static T[] array(T... items); @SuppressWarnings("unchecked") static T[] arrayOf(Class<T> type, T... elements); @SuppressWarnings("unchecked") static T[] arrayOf(Class<T> type, Iterable<? extends T> items); @SuppressWarnings("unchecked") static T[] arrayOf(Iterable<? extends T> items); static Object[] array(Iterable<?> items); static Set<T> set(); static Set<T> set(Iterable<? extends T> values); @SuppressWarnings({"varargs"}) static Set<T> set(T... values); static List<T> list(); static List<T> list(Iterable<? extends T> values); @SuppressWarnings({"varargs"}) static List<T> list(T... values); static Map<K, V> map(); static Map<K, V> map(Map<? extends K, ? extends V> src); static Map<K, V> map(K key, V value); static Map<K, V> map(K key1, V value1, K key2, V value2); static Map<K, V> map(K key1, V value1, K key2, V value2, K key3, V value3); static Map<K, V> map(K key1, V value1, K key2, V value2, K key3, V value3, K key4, V value4); static Map<K, V> map(K key1, V value1, K key2, V value2, K key3, V value3, K key4, V value4, K key5,
                                       V value5); @SuppressWarnings("unchecked") static Map<K, V> map(Object... keysAndValues); static T or(T value, T fallback); static T or(T value, T fallback1, T fallback2); static T or(T value, T fallback1, T fallback2, T fallback3); static String safe(String s); static boolean safe(Boolean b); static int safe(Integer num); static long safe(Long num); static byte safe(Byte num); static float safe(Float num); static double safe(Double num); static Object[] safe(Object[] arr); static List<T> safe(List<T> list); static Set<T> safe(Set<T> set); static Collection<T> safe(Collection<T> coll); static Map<K, V> safe(Map<K, V> map); static long time(); static boolean timedOut(long since, long timeout); static boolean eq(Object a, Object b); static boolean neq(Object a, Object b); static RuntimeException rte(String message); static RuntimeException rte(String message, Throwable cause); static RuntimeException rte(Throwable cause); static RuntimeException rte(String message, Object... args); static RuntimeException rte(String message, Throwable cause, Object... args); static IllegalArgumentException illegal(String message, Object... args); static boolean must(boolean expectedCondition, String message); static boolean must(boolean expectedCondition); static boolean must(boolean expectedCondition, String message, long arg); static boolean must(boolean expectedCondition, String message, Object arg); static boolean must(boolean expectedCondition, String message, Object arg1, Object arg2); static boolean must(boolean expectedCondition, String message, Object arg1, Object arg2, Object arg3); static T notNull(T value, String msgOrDesc, Object... descArgs); static boolean isEmpty(String value); static boolean isEmpty(Object[] arr); static boolean isEmpty(Collection<?> coll); static boolean isEmpty(Iterable<?> iter); static boolean isEmpty(Map<?, ?> map); static boolean isEmpty(Object value); static boolean notEmpty(String value); static boolean notEmpty(Object[] arr); static boolean notEmpty(Collection<?> coll); static boolean notEmpty(Iterable<?> iter); static boolean notEmpty(Map<?, ?> map); static boolean notEmpty(Object value); static int num(String s); static boolean bool(Object o); static int limit(int min, int value, int max); static long limit(long min, long value, long max); static T single(Iterable<T> coll); static T singleOrNone(Iterable<T> coll); static T first(T[] values); static T first(List<T> values); static T last(T[] values); static T last(List<T> values); @SuppressWarnings("unchecked") static int compare(T val1, T val2); static void sleep(long millis); @SuppressWarnings("unchecked") static T cast(Object value); static List<List<T>> groupsOf(int groupSize, Iterable<T> items); static List<List<T>> groupsOf(int groupSize, T... items);  }