Useful to add or subtract an amount of time to an Instant or a LocalDate. It is used with with() method call. For example, If we want to know next date of coming Sunday from now.
LocalDate now = LocalDate.now();
LocalDate nextSunday = now.with(TemporalAdjusters.next(DayOfWeek.SUNDAY));
In the with method call we pass the TemporalAdjusters with next static method call passing DayOfWeek.SUNDAY as parameter.
We have 14 static methods in TemporalAdjusters class to adjust an Instant or LocalDate, like firstDayOfMonth(), lastDayOfMonth(), firstDayOfTheYear(), lastDayOfTheYear(), firstDayOfNextMonth(), firstDayOfNextYear() etc.
//I can also get first Monday in month
//I can also get last Tuesday in a given month
//It will give us local date of next Sunday
//if today is Sunday then it will give me todays and same will go previous call