Searched refs:requireNonNullElseGet (Results 1 – 6 of 6) sorted by relevance
/libcore/ojluni/src/test/java/util/Objects/ |
D | BasicObjectsTest.java | 213 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/ |
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 | 305 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
|
/libcore/ojluni/src/main/java/java/time/format/ |
D | DateTimeFormatterBuilder.java | 4954 return Objects.requireNonNullElseGet(name, () -> chrono.getId()); in getChronologyName()
|
/libcore/api/ |
D | current.txt | 14498 …method @NonNull public static <T> T requireNonNullElseGet(@Nullable T, @NonNull java.util.function…
|