Home
last modified time | relevance | path

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

/libcore/ojluni/src/test/java/util/Objects/
DBasicObjectsTest.java213 if (Objects.requireNonNullElseGet(nullString, () -> defString) != defString) { in testNonNullOf()
216 if (Objects.requireNonNullElseGet(nonNullString, () -> defString) != nonNullString) { in testNonNullOf()
219 if (Objects.requireNonNullElseGet(nonNullString, () -> null) != nonNullString) { in testNonNullOf()
224 Objects.requireNonNullElseGet(null, () -> null); in testNonNullOf()
231 Objects.requireNonNullElseGet(null, null); in testNonNullOf()
/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.java305 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
/libcore/ojluni/src/main/java/java/time/format/
DDateTimeFormatterBuilder.java4954 return Objects.requireNonNullElseGet(name, () -> chrono.getId()); in getChronologyName()
/libcore/api/
Dcurrent.txt14498 …method @NonNull public static <T> T requireNonNullElseGet(@Nullable T, @NonNull java.util.function…