Home
last modified time | relevance | path

Searched refs:requireNonNullElse (Results 1 – 3 of 3) sorted by relevance

/libcore/luni/src/test/java/libcore/java/util/
DObjectsTest.java243 assertEquals("obj", Objects.requireNonNullElse("obj", "default")); in test_requireNonNullElse()
244 assertEquals("default", Objects.requireNonNullElse(null, "default")); in test_requireNonNullElse()
245 assertEquals("obj", Objects.requireNonNullElse("obj", null)); in test_requireNonNullElse()
246 assertThrowsNpe(() -> Objects.requireNonNullElse(null, null)); in test_requireNonNullElse()
260 assertThrowsNpe(() -> Objects.requireNonNullElse(null, null)); in test_requireNonNullElseGet_nullObj()
/libcore/ojluni/src/main/java/java/util/
DObjects.java299 public static <T> T requireNonNullElse(T obj, T defaultObj) { in requireNonNullElse() method in Objects
/libcore/ojluni/annotations/sdk/nullability/java/util/
DObjects.annotated.java58 @libcore.util.NonNull public static <T> T requireNonNullElse(@libcore.util.Nullable T obj, @libcore… in requireNonNullElse() method in Objects