Home
last modified time | relevance | path

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

/libcore/luni/src/test/java/libcore/java/util/
DObjectsTest.java250 assertEquals("obj", Objects.requireNonNullElseGet("obj", () -> "default")); in test_requireNonNullElseGet_obj()
252 assertEquals("obj", Objects.requireNonNullElseGet("obj", () -> null)); in test_requireNonNullElseGet_obj()
253 assertEquals("obj", Objects.requireNonNullElseGet("obj", null)); in test_requireNonNullElseGet_obj()
257 assertEquals("default", Objects.requireNonNullElseGet(null, () -> "default")); in test_requireNonNullElseGet_nullObj()
259 assertThrowsNpe(() -> Objects.requireNonNullElseGet(null, (Supplier<?>) () -> null)); in test_requireNonNullElseGet_nullObj()
/libcore/ojluni/src/main/java/java/util/
DObjects.java318 public static <T> T requireNonNullElseGet(T obj, Supplier<? extends T> supplier) { in requireNonNullElseGet() method in Objects
/libcore/ojluni/annotations/sdk/nullability/java/util/
DObjects.annotated.java60 @libcore.util.NonNull public static <T> T requireNonNullElseGet(@libcore.util.Nullable T obj, @libc… in requireNonNullElseGet() method in Objects