MCPcopy Create free account
hub / github.com/antlr/codebuff / useForNull

Method useForNull

output/java_guava/1.4.18/Joiner.java:242–260  ·  view source on GitHub ↗

Returns a joiner with the same behavior as this one, except automatically substituting nullText for any provided null elements.

(final String nullText)

Source from the content-addressed store, hash-verified

240
241
242 public Joiner useForNull(final String nullText) {
243 checkNotNull(nullText);
244 return new Joiner(this) {
245 @Override
246 CharSequence toString(@Nullable Object part) {
247 return (part == null) ? nullText : Joiner.this.toString(part);
248 }
249
250 @Override
251 public Joiner useForNull(String nullText) {
252 throw new UnsupportedOperationException("already specified useForNull");
253 }
254
255 @Override
256 public Joiner skipNulls() {
257 throw new UnsupportedOperationException("already specified useForNull");
258 }
259 };
260 }
261
262 /**
263 * Returns a joiner with the same behavior as this joiner, except automatically skipping over any

Callers 3

useForNullMethod · 0.45
Collections2Class · 0.45
TypesClass · 0.45

Calls 1

checkNotNullMethod · 0.45

Tested by

no test coverage detected