Home
last modified time | relevance | path

Searched refs:with (Results 1 – 25 of 181) sorted by relevance

12345678

/libcore/luni/src/test/java/libcore/java/time/
DYearMonthTest.java45 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/
DOffsetTime.java343 private OffsetTime with(LocalTime time, ZoneOffset offset) { in with() method in OffsetTime
674 public OffsetTime with(TemporalAdjuster adjuster) { in with() method in OffsetTime
677 return with((LocalTime) adjuster, offset); in with()
679 return with(time, (ZoneOffset) adjuster); in with()
722 public OffsetTime with(TemporalField field, long newValue) { in with() method in OffsetTime
726 return with(time, ZoneOffset.ofTotalSeconds(f.checkValidIntValue(newValue))); in with()
728 return with(time.with(field, newValue), offset); in with()
746 return with(time.withHour(hour), offset); in withHour()
761 return with(time.withMinute(minute), offset); in withMinute()
776 return with(time.withSecond(second), offset); in withSecond()
[all …]
DOffsetDateTime.java418 private OffsetDateTime with(LocalDateTime dateTime, ZoneOffset offset) { in with() method in OffsetDateTime
669 return with(dateTime, offset); in withOffsetSameLocal()
903 public OffsetDateTime with(TemporalAdjuster adjuster) { in with() method in OffsetDateTime
906 return with(dateTime.with(adjuster), offset); in with()
910 return with(dateTime, (ZoneOffset) adjuster); in with()
962 public OffsetDateTime with(TemporalField field, long newValue) { in with() method in OffsetDateTime
967 … return with(dateTime, ZoneOffset.ofTotalSeconds(chronoField.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 …]
DLocalDateTime.java510 private LocalDateTime with(LocalDate newDate, LocalTime newTime) { in with() method in LocalDateTime
908 public LocalDateTime with(TemporalAdjuster adjuster) { in with() method in LocalDateTime
911 return with((LocalDate) adjuster, time); in with()
913 return with(date, (LocalTime) adjuster); in with()
955 public LocalDateTime with(TemporalField field, long newValue) { in with() method in LocalDateTime
958 return with(date, time.with(field, newValue)); in with()
960 return with(date.with(field, newValue), time); in with()
980 return with(date.withYear(year), time); in withYear()
996 return with(date.withMonth(month), time); in withMonth()
1013 return with(date.withDayOfMonth(dayOfMonth), time); in withDayOfMonth()
[all …]
DYearMonth.java313 private YearMonth with(int newYear, int newMonth) { in with() method in YearMonth
624 public YearMonth with(TemporalAdjuster adjuster) { in with() method in YearMonth
677 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/test/java/time/test/java/time/
DTestLocalDateTime.java158 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/temporal/
DTemporalAdjusters.java144 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()
DTemporal.java189 default Temporal with(TemporalAdjuster adjuster) { in with() method
225 Temporal with(TemporalField field, long newValue); in with() method
/libcore/ojluni/src/main/java/java/time/chrono/
DMinguoDate.java306 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 …]
DThaiBuddhistDate.java306 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 …]
DChronoLocalDateTimeImpl.java218 private ChronoLocalDateTimeImpl<D> with(Temporal newDate, LocalTime newTime) { in with() method in ChronoLocalDateTimeImpl
274 public ChronoLocalDateTimeImpl<D> with(TemporalAdjuster adjuster) { in with() method in ChronoLocalDateTimeImpl
277 return with((ChronoLocalDate) adjuster, time); in with()
279 return with(date, (LocalTime) adjuster); in with()
287 public ChronoLocalDateTimeImpl<D> with(TemporalField field, long newValue) { in with() method in ChronoLocalDateTimeImpl
290 return with(date, time.with(field, newValue)); in with()
292 return with(date.with(field, newValue), time); in with()
311 return with(date.plus(amountToAdd, unit), time); in plus()
317 return with(date.plus(days, ChronoUnit.DAYS), time); in plusDays()
340 return with(newDate, time); in plusWithOverflow()
[all …]
DJapaneseDate.java512 public JapaneseDate with(TemporalField field, long newValue) { in with() method in JapaneseDate
526 return with(isoDate.withYear(nvalue)); in with()
534 return with(isoDate.with(field, newValue)); in with()
536 return super.with(field, newValue); in with()
545 public JapaneseDate with(TemporalAdjuster adjuster) { in with() method in JapaneseDate
546 return super.with(adjuster); in with()
585 return with(isoDate.withYear(year)); in withYear()
608 return with(isoDate.plusYears(years)); in plusYears()
613 return with(isoDate.plusMonths(months)); in plusMonths()
618 return with(isoDate.plusWeeks(weeksToAdd)); in plusWeeks()
[all …]
DChronoLocalDateTime.java272 default ChronoLocalDateTime<D> with(TemporalAdjuster adjuster) { in with() method
273 return ChronoLocalDateTimeImpl.ensureValid(getChronology(), Temporal.super.with(adjuster)); in with()
282 ChronoLocalDateTime<D> with(TemporalField field, long newValue); in with() method
386 .with(EPOCH_DAY, toLocalDate().toEpochDay()) in adjustInto()
387 .with(NANO_OF_DAY, toLocalTime().toNanoOfDay()); in adjustInto()
DChronoLocalDateImpl.java179 public D with(TemporalAdjuster adjuster) { in with() method in ChronoLocalDateImpl
180 return (D) ChronoLocalDate.super.with(adjuster); in with()
185 public D with(TemporalField field, long value) { in with() method in ChronoLocalDateImpl
186 return (D) ChronoLocalDate.super.with(field, value); in with()
209 case ERAS: return with(ERA, Math.addExact(getLong(ERA), amountToAdd)); in plus()
DChronoLocalDate.java427 default ChronoLocalDate with(TemporalAdjuster adjuster) { in with() method
428 return ChronoLocalDateImpl.ensureValid(getChronology(), Temporal.super.with(adjuster)); in with()
438 default ChronoLocalDate with(TemporalField field, long newValue) { in with() method
551 return temporal.with(EPOCH_DAY, toEpochDay()); in adjustInto()
/libcore/ojluni/src/test/java/time/test/java/time/chrono/
DTestUmmAlQuraChronology.java218 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/ojluni/src/test/java/util/Properties/
Dinput.txt2 # comment ending with slash \
9 # comment with leading space
/libcore/luni/src/test/java17language/
Drewrite-test-for-jarjar.sed4 # 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/java9language/
Drewrite-test-for-jarjar.sed4 # 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/java11language/
Drewrite-test-for-jarjar.sed4 # 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/ojluni/src/test/java/time/tck/java/time/
DTestIsoChronology.java211 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/out_hb/
Dstaff.out12 Martha RaynoldsThis is a CDATASection with EntityReference number 2 &ent2;
13 This is an adjacent CDATASection with a reference to a tab &tab;
/libcore/luni/src/test/resources/keystore/
DREADME.md58 Essentially the same as above, but with 3DES encryption for both the certificate
59 and the private key. All the pbe-3des-* files use this encryption but with
64 All the pbes2-* files are generated with the `mkstores.sh` script which uses
72 for testing. Created with:
/libcore/ojluni/src/main/java/java/nio/
DHeap-X-Buffer.java.template19 * 2 along with this work; if not, write to the Free Software Foundation,
69 // Android-changed: Merge the Read-only buffer class with this Read-Write buffer class.
85 // Android-added: Merge the Read-only buffer class with this Read-Write buffer class.
95 // Android-changed: Merge the Read-only buffer class with this Read-Write buffer class.
111 // Android-added: Merge the Read-only buffer class with this Read-Write buffer class.
118 // Android-changed: Merge the Read-only buffer class with this Read-Write buffer class.
127 // Android-changed: Merge the Read-only buffer class with this Read-Write buffer class.
152 // Android-changed: Merge the Read-only buffer class with this Read-Write buffer class.
166 // Android-changed: Merge the Read-only buffer class with this Read-Write buffer class.
178 // Android-changed: Merge the Read-only buffer class with this Read-Write buffer class.
[all …]
/libcore/ojluni/src/test/java/time/tck/java/time/temporal/
DTCKWeekFields.java142 assertEquals(date.with(WeekFields.ISO.dayOfWeek(), 2), LocalDate.of(2000, 1, 11)); in test_dayOfWeekField_simpleSet()
143 assertEquals(date.with(WeekFields.ISO.dayOfWeek(), 7), LocalDate.of(2000, 1, 16)); in test_dayOfWeekField_simpleSet()
145 assertEquals(date.with(WeekFields.SUNDAY_START.dayOfWeek(), 3), LocalDate.of(2000, 1, 11)); in test_dayOfWeekField_simpleSet()
146 assertEquals(date.with(WeekFields.SUNDAY_START.dayOfWeek(), 7), LocalDate.of(2000, 1, 15)); in test_dayOfWeekField_simpleSet()
148 …assertEquals(date.with(WeekFields.of(DayOfWeek.SATURDAY, 1).dayOfWeek(), 4), LocalDate.of(2000, 1,… in test_dayOfWeekField_simpleSet()
149 …assertEquals(date.with(WeekFields.of(DayOfWeek.TUESDAY, 1).dayOfWeek(), 1), LocalDate.of(2000, 1, … in test_dayOfWeekField_simpleSet()
279 LocalDate last = day.with(DAY_OF_MONTH, day.lengthOfMonth()); in test_fieldRanges()
281 LocalDate first = day.with(DAY_OF_MONTH, 1); in test_fieldRanges()
291 last = day.with(DAY_OF_YEAR, day.lengthOfYear()); in test_fieldRanges()
293 first = day.with(DAY_OF_YEAR, 1); in test_fieldRanges()
[all …]

12345678