public DateTimeFormatter withResolverFields(TemporalField... resolverFields) {
        Set<TemporalField> fields = null;
        if (resolverFields != null) {
            fields = Collections.unmodifiableSet(new HashSet<>(Arrays.asList(resolverFields)));
        }
        if (Objects.equals(this.resolverFields, fields)) {
            return this;
        }
        return new DateTimeFormatter(printerParser, locale, decimalStyle, resolverStyle, fields, chrono, zone);
    }
public DateTimeFormatter withResolverFields ( TemporalField ... resolverFields ) { Set < TemporalField > fields = null ; if ( resolverFields != null ) { fields = Collections . unmodifiableSet ( new HashSet < > ( Arrays . asList ( resolverFields ) ) ) ; } if ( Objects . equals ( this . resolverFields , fields ) ) { return this ; } return new DateTimeFormatter ( printerParser , locale , decimalStyle , resolverStyle , fields , chrono , zone ) ; }
Returns a copy of this formatter with a new set of resolver fields.
<p>
This returns a formatter with similar state to this formatter but with
the resolver fields set. By default, a formatter has no resolver fields.
<p>
Changing the resolver fields only has an effect during parsing.
Parsing a text string occurs in two phases.
Phase 1 is a basic text parse according to the fields added to the builder.
Phase 2 resolves the parsed field-value pairs into date and/or time objects.
The resolver fields are used to filter the field-value pairs between phase 1 and 2.
<p>
This can be used to select between two or more ways that a date or time might
be resolved. For example, if the formatter consists of year, month, day-of-month
and day-of-year, then there are two ways to resolve a date.
Calling this method with the arguments {@link ChronoField#YEAR YEAR} and
{@link ChronoField#DAY_OF_YEAR DAY_OF_YEAR} will ensure that the date is
resolved using the year and day-of-year, effectively meaning that the month
and day-of-month are ignored during the resolving phase.
<p>
In a similar manner, this method can be used to ignore secondary fields that
would otherwise be cross-checked. For example, if the formatter consists of year,
month, day-of-month and day-of-week, then there is only one way to resolve a
date, but the parsed value for day-of-week will be cross-checked against the
resolved date. Calling this method with the arguments {@link ChronoField#YEAR YEAR},
{@link ChronoField#MONTH_OF_YEAR MONTH_OF_YEAR} and
{@link ChronoField#DAY_OF_MONTH DAY_OF_MONTH} will ensure that the date is
resolved correctly, but without any cross-check for the day-of-week.
<p>
In implementation terms, this method behaves as follows. The result of the
parsing phase can be considered to be a map of field to value. The behavior
of this method is to cause that map to be filtered between phase 1 and 2,
removing all fields other than those specified as arguments to this method.
<p>
This instance is immutable and unaffected by this method call.

@param resolverFields  the new set of resolver fields, null if no fields
@return a formatter based on this formatter with the requested resolver style, not null