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

Method firstNonNull

output/java_guava/1.4.17/Objects.java:186–189  ·  view source on GitHub ↗

Returns the first of two given parameters that is not null, if either is, or otherwise throws a NullPointerException. Note: if first is represented as an Optional, this can be accomplished with plain Optional#or(Object) first.or(second). That approac

(@Nullable T first, @Nullable T second)

Source from the content-addressed store, hash-verified

184 */
185
186 @Deprecated
187 public static <T> T firstNonNull(@Nullable T first, @Nullable T second) {
188 return MoreObjects.firstNonNull(first, second);
189 }
190
191 /**
192 * Support class for {@link Objects#toStringHelper}.

Callers

nothing calls this directly

Calls 1

firstNonNullMethod · 0.95

Tested by

no test coverage detected