예제 #1
0
 /** skipNulls与useForNull不能同时使用 */
 @Test
 public void testJoiner03() {
   Joiner joiner = Joiner.on(",").skipNulls();
   joiner.useForNull("missing");
   String result = joiner.join(lists);
   System.out.println(result);
   ;
 }
예제 #2
0
 /**
  * Returns a map joiner with the same behavior as this one, except automatically substituting
  * {@code nullText} for any provided null keys or values.
  */
 @CheckReturnValue
 public MapJoiner useForNull(String nullText) {
   return new MapJoiner(joiner.useForNull(nullText), keyValueSeparator);
 }