Home
last modified time | relevance | path

Searched refs:requireNonNullElse (Results 1 – 11 of 11) sorted by relevance

/libcore/luni/src/test/java/libcore/java/util/
DObjectsTest.java243 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/test/java/util/Objects/
DBasicObjectsTest.java192 String result = Objects.requireNonNullElse(nullString, defString); in testNonNullOf()
197 if (Objects.requireNonNullElse(nonNullString, defString) != nonNullString) { in testNonNullOf()
200 if (Objects.requireNonNullElse(nonNullString, null) != nonNullString) { in testNonNullOf()
204 Objects.requireNonNullElse(null, null); in testNonNullOf()
/libcore/ojluni/src/main/java/java/util/
DObjects.java286 public static <T> T requireNonNullElse(T obj, T defaultObj) { in requireNonNullElse() method in Objects
DFormatter.java3247 return s.toUpperCase(Objects.requireNonNullElse(l, in toUpperCaseWithLocale()
4211 sb.append(s.toLowerCase(Objects.requireNonNullElse(l,
4245 Objects.requireNonNullElse(l, Locale.US)));
4253 Locale lt = Objects.requireNonNullElse(l, Locale.US);
4265 Locale lt = Objects.requireNonNullElse(l, Locale.US);
4438 sb.append(s.toLowerCase(Objects.requireNonNullElse(l,
4478 … Objects.requireNonNullElse(l, Locale.US)));
4488 Locale lt = Objects.requireNonNullElse(l, Locale.US);
4500 Locale lt = Objects.requireNonNullElse(l, Locale.US);
/libcore/ojluni/annotations/sdk/nullability/java/util/
DObjects.annotated.java58 @libcore.util.NonNull public static <T> T requireNonNullElse(@libcore.util.Nullable T obj, @libcore… in requireNonNullElse() method in Objects
/libcore/ojluni/src/main/java/java/time/format/
DDateTimePrintContext.java149 … Chronology chrono = Objects.requireNonNullElse(effectiveChrono, IsoChronology.INSTANCE); in adjust()
DDateTimeFormatterBuilder.java3150 "," + Objects.requireNonNullElse(baseDate, baseValue) + ")"; in toString()
/libcore/ojluni/src/main/java/java/time/
DZoneId.java307 String id = Objects.requireNonNullElse(aliasMap.get(zoneId), zoneId); in of()
/libcore/ojluni/src/main/java/java/time/chrono/
DChronology.java185 return Objects.requireNonNullElse(obj, IsoChronology.INSTANCE); in from()
/libcore/ojluni/src/main/java/java/nio/charset/
DCharset.java702 String[] as = Objects.requireNonNullElse(aliases, zeroAliases);
/libcore/api/
Dcurrent.txt14497 method @NonNull public static <T> T requireNonNullElse(@Nullable T, @NonNull T);