Searched refs:requireNonNullElse (Results 1 – 3 of 3) sorted by relevance
/libcore/luni/src/test/java/libcore/java/util/ |
D | ObjectsTest.java | 243 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/ |
D | Objects.java | 299 public static <T> T requireNonNullElse(T obj, T defaultObj) { in requireNonNullElse() method in Objects
|
/libcore/ojluni/annotations/sdk/nullability/java/util/ |
D | Objects.annotated.java | 58 @libcore.util.NonNull public static <T> T requireNonNullElse(@libcore.util.Nullable T obj, @libcore… in requireNonNullElse() method in Objects
|