Searched refs:requireNonNullElseGet (Results 1 – 3 of 3) sorted by relevance
/libcore/luni/src/test/java/libcore/java/util/ |
D | ObjectsTest.java | 250 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/ |
D | Objects.java | 318 public static <T> T requireNonNullElseGet(T obj, Supplier<? extends T> supplier) { in requireNonNullElseGet() method in Objects
|
/libcore/ojluni/annotations/sdk/nullability/java/util/ |
D | Objects.annotated.java | 60 @libcore.util.NonNull public static <T> T requireNonNullElseGet(@libcore.util.Nullable T obj, @libc… in requireNonNullElseGet() method in Objects
|