Returns the first of two given parameters that is not null, if either is, or otherwise throws a NullPointerException. To find the first non-null element in an iterable, use Iterables.find(iterable, Predicates.notNull()). For varargs, use {@code Iterables.find(Arrays.asLis
(@Nullable T first, @Nullable T second)
| 55 | */ |
| 56 | |
| 57 | public static <T> T firstNonNull(@Nullable T first, @Nullable T second) { |
| 58 | return first != null ? first : checkNotNull(second); |
| 59 | } |
| 60 | |
| 61 | /** |
| 62 | * Creates an instance of {@link ToStringHelper}. |
no test coverage detected