YearMonth._with

Returns an adjusted copy of this year-month. !(p) This returns a {@code YearMonth}, based on this one, with the year-month adjusted. The adjustment takes place using the specified adjuster strategy object. Read the documentation of the adjuster to understand what adjustment will be made. !(p) A simple adjuster might simply set the one of the fields, such as the year field. A more complex adjuster might set the year-month to the next month that Halley's comet will pass the Earth. !(p) The result of this method is obtained by invoking the {@link TemporalAdjuster#adjustInto(Temporal)} method on the specified adjuster passing {@code this} as the argument. !(p) This instance is immutable and unaffected by this method call.

@param adjuster the adjuster to use, not null @return a {@code YearMonth} based on {@code this} with the adjustment made, not null @throws DateTimeException if the adjustment cannot be made @throws ArithmeticException if numeric overflow occurs

  1. YearMonth _with(TemporalAdjuster adjuster)
    class YearMonth
  2. YearMonth _with(TemporalField field, long newValue)

Meta