/libcore/luni/src/test/java/libcore/java/time/ |
D | YearMonthTest.java | 45 assertEquals(YearMonth.of(1000, Month.JANUARY), ym.with(ChronoField.YEAR, 1000)); in test_with_TemporalField_long() 46 assertEquals(YearMonth.of(-1, Month.JANUARY), ym.with(ChronoField.YEAR, -1)); in test_with_TemporalField_long() 47 assertEquals(YearMonth.of(2000, Month.FEBRUARY), ym.with(ChronoField.MONTH_OF_YEAR, 2)); in test_with_TemporalField_long() 49 bceYm.with(ChronoField.MONTH_OF_YEAR, 12)); in test_with_TemporalField_long() 50 assertSame(ym, ym.with(ChronoField.ERA, IsoEra.CE.getValue())); in test_with_TemporalField_long() 51 assertSame(bceYm, bceYm.with(ChronoField.ERA, IsoEra.BCE.getValue())); in test_with_TemporalField_long() 53 assertEquals(bceYm, ym.with(ChronoField.ERA, IsoEra.BCE.getValue())); in test_with_TemporalField_long() 54 assertEquals(ym, bceYm.with(ChronoField.ERA, IsoEra.CE.getValue())); in test_with_TemporalField_long() 55 assertEquals(YearMonth.of(1, Month.JANUARY), ym.with(ChronoField.YEAR_OF_ERA, 1)); in test_with_TemporalField_long() 57 assertEquals(YearMonth.of(0, Month.JANUARY), bceYm.with(ChronoField.YEAR_OF_ERA, 1)); in test_with_TemporalField_long() [all …]
|
/libcore/ojluni/src/main/java/java/time/ |
D | OffsetDateTime.java | 417 private OffsetDateTime with(LocalDateTime dateTime, ZoneOffset offset) { in with() method in OffsetDateTime 668 return with(dateTime, offset); in withOffsetSameLocal() 902 public OffsetDateTime with(TemporalAdjuster adjuster) { in with() method in OffsetDateTime 905 return with(dateTime.with(adjuster), offset); in with() 909 return with(dateTime, (ZoneOffset) adjuster); in with() 961 public OffsetDateTime with(TemporalField field, long newValue) { in with() method in OffsetDateTime 967 … return with(dateTime, ZoneOffset.ofTotalSeconds(f.checkValidIntValue(newValue))); in with() 970 return with(dateTime.with(field, newValue), offset); in with() 989 return with(dateTime.withYear(year), offset); in withYear() 1005 return with(dateTime.withMonth(month), offset); in withMonth() [all …]
|
D | LocalDateTime.java | 509 private LocalDateTime with(LocalDate newDate, LocalTime newTime) { in with() method in LocalDateTime 911 public LocalDateTime with(TemporalAdjuster adjuster) { in with() method in LocalDateTime 914 return with((LocalDate) adjuster, time); in with() 916 return with(date, (LocalTime) adjuster); in with() 958 public LocalDateTime with(TemporalField field, long newValue) { in with() method in LocalDateTime 962 return with(date, time.with(field, newValue)); in with() 964 return with(date.with(field, newValue), time); in with() 984 return with(date.withYear(year), time); in withYear() 1000 return with(date.withMonth(month), time); in withMonth() 1017 return with(date.withDayOfMonth(dayOfMonth), time); in withDayOfMonth() [all …]
|
D | YearMonth.java | 312 private YearMonth with(int newYear, int newMonth) { in with() method in YearMonth 623 public YearMonth with(TemporalAdjuster adjuster) { in with() method in YearMonth 676 public YearMonth with(TemporalField field, long newValue) { in with() method in YearMonth 704 return with(year, month); in withYear() 718 return with(year, month); in withMonth() 807 case ERAS: return with(ERA, Math.addExact(getLong(ERA), amountToAdd)); in plus() 828 return with(newYear, month); in plusYears() 848 return with(newYear, newMonth); in plusMonths() 988 return temporal.with(PROLEPTIC_MONTH, getProlepticMonth()); in adjustInto()
|
/libcore/ojluni/src/main/java/java/time/temporal/ |
D | TemporalAdjusters.java | 144 return temporal.with(output); in ofDateAdjuster() 166 return (temporal) -> temporal.with(DAY_OF_MONTH, 1); in firstDayOfMonth() 189 return (temporal) -> temporal.with(DAY_OF_MONTH, temporal.range(DAY_OF_MONTH).getMaximum()); in lastDayOfMonth() 209 return (temporal) -> temporal.with(DAY_OF_MONTH, 1).plus(1, MONTHS); in firstDayOfNextMonth() 230 return (temporal) -> temporal.with(DAY_OF_YEAR, 1); in firstDayOfYear() 251 return (temporal) -> temporal.with(DAY_OF_YEAR, temporal.range(DAY_OF_YEAR).getMaximum()); in lastDayOfYear() 270 return (temporal) -> temporal.with(DAY_OF_YEAR, 1).plus(1, YEARS); in firstDayOfNextYear() 351 Temporal temp = temporal.with(DAY_OF_MONTH, 1); in dayOfWeekInMonth() 359 … Temporal temp = temporal.with(DAY_OF_MONTH, temporal.range(DAY_OF_MONTH).getMaximum()); in dayOfWeekInMonth()
|
D | Temporal.java | 189 default Temporal with(TemporalAdjuster adjuster) { in with() method 225 Temporal with(TemporalField field, long newValue); in with() method
|
/libcore/ojluni/src/test/java/time/test/java/time/ |
D | TestLocalDateTime.java | 158 LocalDateTime t = TEST_2007_07_15_12_30_40_987654321.with(LocalTime.of(1, 0)).withHour(0); in test_withHour_toMidnight() 164 LocalDateTime t = TEST_2007_07_15_12_30_40_987654321.with(LocalTime.of(1, 0)).withHour(12); in test_withHour_toMidday() 176 LocalDateTime t = TEST_2007_07_15_12_30_40_987654321.with(LocalTime.of(0, 1)).withMinute(0); in test_withMinute_toMidnight() 182 … LocalDateTime t = TEST_2007_07_15_12_30_40_987654321.with(LocalTime.of(12, 1)).withMinute(0); in test_withMinute_toMidday() 194 … LocalDateTime t = TEST_2007_07_15_12_30_40_987654321.with(LocalTime.of(0, 0, 1)).withSecond(0); in test_withSecond_toMidnight() 200 … LocalDateTime t = TEST_2007_07_15_12_30_40_987654321.with(LocalTime.of(12, 0, 1)).withSecond(0); in test_withSecond_toMidday() 212 … LocalDateTime t = TEST_2007_07_15_12_30_40_987654321.with(LocalTime.of(0, 0, 0, 1)).withNano(0); in test_withNanoOfSecond_toMidnight() 218 … LocalDateTime t = TEST_2007_07_15_12_30_40_987654321.with(LocalTime.of(12, 0, 0, 1)).withNano(0); in test_withNanoOfSecond_toMidday() 272 LocalDateTime t = TEST_2007_07_15_12_30_40_987654321.with(LocalTime.of(23, 0)).plusHours(1); in test_plusHours_toMidnight() 278 LocalDateTime t = TEST_2007_07_15_12_30_40_987654321.with(LocalTime.of(11, 0)).plusHours(1); in test_plusHours_toMidday() [all …]
|
/libcore/ojluni/src/main/java/java/time/chrono/ |
D | ThaiBuddhistDate.java | 305 public ThaiBuddhistDate with(TemporalField field, long newValue) { in with() method in ThaiBuddhistDate 321 …return with(isoDate.withYear((getProlepticYear() >= 1 ? nvalue : 1 - nvalue) - YEARS_DIFFERENCE)); in with() 323 return with(isoDate.withYear(nvalue - YEARS_DIFFERENCE)); in with() 325 … return with(isoDate.withYear((1 - getProlepticYear()) - YEARS_DIFFERENCE)); in with() 329 return with(isoDate.with(field, newValue)); in with() 331 return super.with(field, newValue); in with() 340 public ThaiBuddhistDate with(TemporalAdjuster adjuster) { in with() method in ThaiBuddhistDate 341 return super.with(adjuster); in with() 367 return with(isoDate.plusYears(years)); in plusYears() 372 return with(isoDate.plusMonths(months)); in plusMonths() [all …]
|
D | MinguoDate.java | 305 public MinguoDate with(TemporalField field, long newValue) { in with() method in MinguoDate 321 …return with(isoDate.withYear(getProlepticYear() >= 1 ? nvalue + YEARS_DIFFERENCE : (1 - nvalue) +… in with() 323 return with(isoDate.withYear(nvalue + YEARS_DIFFERENCE)); in with() 325 … return with(isoDate.withYear((1 - getProlepticYear()) + YEARS_DIFFERENCE)); in with() 329 return with(isoDate.with(field, newValue)); in with() 331 return super.with(field, newValue); in with() 340 public MinguoDate with(TemporalAdjuster adjuster) { in with() method in MinguoDate 341 return super.with(adjuster); in with() 367 return with(isoDate.plusYears(years)); in plusYears() 372 return with(isoDate.plusMonths(months)); in plusMonths() [all …]
|
D | ChronoLocalDateTimeImpl.java | 217 private ChronoLocalDateTimeImpl<D> with(Temporal newDate, LocalTime newTime) { in with() method in ChronoLocalDateTimeImpl 277 public ChronoLocalDateTimeImpl<D> with(TemporalAdjuster adjuster) { in with() method in ChronoLocalDateTimeImpl 280 return with((ChronoLocalDate) adjuster, time); in with() 282 return with(date, (LocalTime) adjuster); in with() 290 public ChronoLocalDateTimeImpl<D> with(TemporalField field, long newValue) { in with() method in ChronoLocalDateTimeImpl 294 return with(date, time.with(field, newValue)); in with() 296 return with(date.with(field, newValue), time); in with() 316 return with(date.plus(amountToAdd, unit), time); in plus() 322 return with(date.plus(days, ChronoUnit.DAYS), time); in plusDays() 345 return with(newDate, time); in plusWithOverflow() [all …]
|
D | JapaneseDate.java | 515 public JapaneseDate with(TemporalField field, long newValue) { in with() method in JapaneseDate 530 return with(isoDate.withYear(nvalue)); in with() 538 return with(isoDate.with(field, newValue)); in with() 540 return super.with(field, newValue); in with() 549 public JapaneseDate with(TemporalAdjuster adjuster) { in with() method in JapaneseDate 550 return super.with(adjuster); in with() 589 return with(isoDate.withYear(year)); in withYear() 612 return with(isoDate.plusYears(years)); in plusYears() 617 return with(isoDate.plusMonths(months)); in plusMonths() 622 return with(isoDate.plusWeeks(weeksToAdd)); in plusWeeks() [all …]
|
D | ChronoLocalDateTime.java | 265 default ChronoLocalDateTime<D> with(TemporalAdjuster adjuster) { in with() method 266 return ChronoLocalDateTimeImpl.ensureValid(getChronology(), Temporal.super.with(adjuster)); in with() 275 ChronoLocalDateTime<D> with(TemporalField field, long newValue); in with() method 379 .with(EPOCH_DAY, toLocalDate().toEpochDay()) in adjustInto() 380 .with(NANO_OF_DAY, toLocalTime().toNanoOfDay()); in adjustInto()
|
D | ChronoLocalDateImpl.java | 178 public D with(TemporalAdjuster adjuster) { in with() method in ChronoLocalDateImpl 179 return (D) ChronoLocalDate.super.with(adjuster); in with() 184 public D with(TemporalField field, long value) { in with() method in ChronoLocalDateImpl 185 return (D) ChronoLocalDate.super.with(field, value); in with() 209 case ERAS: return with(ERA, Math.addExact(getLong(ERA), amountToAdd)); in plus()
|
D | ChronoLocalDate.java | 424 default ChronoLocalDate with(TemporalAdjuster adjuster) { in with() method 425 return ChronoLocalDateImpl.ensureValid(getChronology(), Temporal.super.with(adjuster)); in with() 435 default ChronoLocalDate with(TemporalField field, long newValue) { in with() method 548 return temporal.with(EPOCH_DAY, toEpochDay()); in adjustInto()
|
/libcore/ojluni/src/test/java/time/test/java/time/chrono/ |
D | TestUmmAlQuraChronology.java | 218 maxDate = maxDate.with(DAY_OF_MONTH, monthLen); in test_hijrahDateLimits() 263 HijrahDate hd2 = hd.with(DAY_OF_YEAR, i); in test_withDayOfYear() 272 HijrahDate hd2 = hd.with(DAY_OF_YEAR, 0); in test_withDayOfYearTooSmall() 278 HijrahDate hd2 = hd.with(DAY_OF_YEAR, hd.lengthOfYear() + 1); in test_withDayOfYearTooLarge() 284 …assertEquals(HijrahChronology.INSTANCE.date(1320, 1, 15).with(ChronoField.DAY_OF_WEEK, 4), HijrahD… in test_adjustWithDayOfWeek() 285 …assertEquals(HijrahChronology.INSTANCE.date(1421, 11, 15).with(ChronoField.DAY_OF_WEEK, 1), Hijrah… in test_adjustWithDayOfWeek() 286 …assertEquals(HijrahChronology.INSTANCE.date(1529, 7, 18).with(ChronoField.DAY_OF_WEEK, 6), HijrahD… in test_adjustWithDayOfWeek() 287 …assertEquals(HijrahChronology.INSTANCE.date(1534, 2, 10).with(ChronoField.DAY_OF_WEEK, 5), HijrahD… in test_adjustWithDayOfWeek() 288 …assertEquals(HijrahChronology.INSTANCE.date(1552, 4, 1).with(ChronoField.DAY_OF_WEEK, 2), HijrahDa… in test_adjustWithDayOfWeek() 294 …assertEquals(HijrahChronology.INSTANCE.date(1320, 1, 15).with(ChronoField.DAY_OF_MONTH, 2), Hijrah… in test_adjustWithDayOfMonth() [all …]
|
/libcore/luni/src/test/java9language/ |
D | rewrite-test-for-jarjar.sed | 4 # you may not use this file except in compliance with the License. 17 # Replace libcore.internal with libcore.internal.repackaged in imports: 20 # Replace Test with JarjarTest in class declarations.
|
/libcore/luni/src/test/resources/out_hb/ |
D | staff.out | 12 Martha RaynoldsThis is a CDATASection with EntityReference number 2 &ent2; 13 This is an adjacent CDATASection with a reference to a tab &tab;
|
/libcore/ojluni/src/test/java/time/tck/java/time/ |
D | TestIsoChronology.java | 211 LocalDate test = base.with(TemporalAdjusters.lastDayOfMonth()); in test_adjust1() 218 LocalDate test = base.with(TemporalAdjusters.lastDayOfMonth()); in test_adjust2() 228 LocalDate test = isoDate.with(LocalDate.of(2012, 7, 6)); in test_adjust_toLocalDate() 235 assertEquals(IsoChronology.INSTANCE.date(1726, 4, 4), isoDate.with(Month.APRIL)); in test_adjust_toMonth() 244 LocalDate test = LocalDate.MIN.with(isoDate); in test_LocalDate_adjustToISODate() 251 LocalDateTime test = LocalDateTime.MIN.with(isoDate); in test_LocalDateTime_adjustToISODate()
|
/libcore/luni/src/test/resources/org/apache/harmony/tests/java/lang/ |
D | test#.properties | 1 This is a resource file with a # in the name
|
D | test?.properties | 1 This is a resource file with a ? in the name
|
/libcore/harmony-tests/src/test/resources/resources/ |
D | test.rtf | 3 * contributor license agreements. See the NOTICE file distributed with 6 * (the "License"); you may not use this file except in compliance with
|
/libcore/luni/src/test/resources/tests/api/java/io/ |
D | testfile.txt | 1 This is a test message with Unicode character. �й� is China's name in Chinese
|
D | testfile-utf8.txt | 1 This is a test message with Unicode character. 中国 is China's name in Chinese
|
D | testfile | 1 This is a test message with Unicode character. \u4e2d\u56fd is China's name in Chinese
|
/libcore/ojluni/src/test/java/time/tck/java/time/temporal/ |
D | TCKWeekFields.java | 140 assertEquals(date.with(WeekFields.ISO.dayOfWeek(), 2), LocalDate.of(2000, 1, 11)); in test_dayOfWeekField_simpleSet() 141 assertEquals(date.with(WeekFields.ISO.dayOfWeek(), 7), LocalDate.of(2000, 1, 16)); in test_dayOfWeekField_simpleSet() 143 assertEquals(date.with(WeekFields.SUNDAY_START.dayOfWeek(), 3), LocalDate.of(2000, 1, 11)); in test_dayOfWeekField_simpleSet() 144 assertEquals(date.with(WeekFields.SUNDAY_START.dayOfWeek(), 7), LocalDate.of(2000, 1, 15)); in test_dayOfWeekField_simpleSet() 146 …assertEquals(date.with(WeekFields.of(DayOfWeek.SATURDAY, 1).dayOfWeek(), 4), LocalDate.of(2000, 1,… in test_dayOfWeekField_simpleSet() 147 …assertEquals(date.with(WeekFields.of(DayOfWeek.TUESDAY, 1).dayOfWeek(), 1), LocalDate.of(2000, 1, … in test_dayOfWeekField_simpleSet() 277 LocalDate last = day.with(DAY_OF_MONTH, day.lengthOfMonth()); in test_fieldRanges() 279 LocalDate first = day.with(DAY_OF_MONTH, 1); in test_fieldRanges() 289 last = day.with(DAY_OF_YEAR, day.lengthOfYear()); in test_fieldRanges() 291 first = day.with(DAY_OF_YEAR, 1); in test_fieldRanges() [all …]
|