ronoLocalDate resolveYMD(Map<TemporalField, Long> fieldValues, ResolverStyle resolverStyle) {
        int y = range(YEAR).checkValidIntValue(fieldValues.remove(YEAR), YEAR);
        if (resolverStyle == ResolverStyle.LENIENT) {
            long months = Math.subtractExact(fieldValues.remove(MONTH_OF_YEAR), 1);
            long days = Math.subtractExact(fieldValues.remove(DAY_OF_MONTH), 1);
            return date(y, 1, 1).plus(months, MONTHS).plus(days, DAYS);
        }
        int moy = range(MONTH_OF_YEAR).checkValidIntValue(fieldValues.remove(MONTH_OF_YEAR), MONTH_OF_YEAR);
        ValueRange domRange = range(DAY_OF_MONTH);
        int dom = domRange.checkValidIntValue(fieldValues.remove(DAY_OF_MONTH), DAY_OF_MONTH);
        if (resolverStyle == ResolverStyle.SMART) {  // previous valid
            try {
                return date(y, moy, dom);
            } catch (DateTimeException ex) {
                return date(y, moy, 1).with(TemporalAdjusters.lastDayOfMonth());
            }
        }
        return date(y, moy, dom);
    }

    ChronoLocalDate resolveYD(Map<TemporalField, Long> fieldValues, ResolverStyle resolverStyle) {
        int y = range(YEAR).checkValidIntValue(fieldValues.remove(YEAR), YEAR);
        if (resolverStyle == ResolverStyle.LENIENT) {
            long days = Math.subtractExact(fieldValues.remove(DAY_OF_YEAR), 1);
            return dateYearDay(y, 1).plus(days, DAYS);
        }
        int doy = range(DAY_OF_YEAR).checkValidIntValue(fieldValues.remove(DAY_OF_YEAR), DAY_OF_YEAR);
        return dateYearDay(y, doy);  // smart is same as strict
    }
ronoLocalDate resolveYMD(Map < TemporalField, Long > fieldValues, ResolverStyle resolverStyle) { 
         int y = range(YEAR).checkValidIntValue(fieldValues.remove(YEAR), YEAR); 
         if (resolverStyle = = ResolverStyle. LENIENT) { 
             long months = Math.subtractExact(fieldValues.remove(MONTH_OF_YEAR), 1); 
             long days = Math.subtractExact(fieldValues.remove(DAY_OF_MONTH), 1); 
             return date(y, 1, 1).plus(months, MONTHS).plus(days, DAYS); 
         } 
         int moy = range(MONTH_OF_YEAR).checkValidIntValue(fieldValues.remove(MONTH_OF_YEAR), MONTH_OF_YEAR); 
         ValueRange domRange = range(DAY_OF_MONTH); 
         int dom = domRange.checkValidIntValue(fieldValues.remove(DAY_OF_MONTH), DAY_OF_MONTH); 
         if (resolverStyle = = ResolverStyle. SMART) {   // former valid 
             attempt { 
                 return date(y, moy, dom); 
             } apprehension (DateTimeException ex) { 
                 return date(y, moy, 1).with(TemporalAdjusters.lastDayOfMonth ()); 
             } 
         } 
         return date(y, moy, dom); 
     } 

     ChronoLocalDate resolveYD(Map < TemporalField, Long > fieldValues, ResolverStyle resolverStyle) { 
         int y = range(YEAR).checkValidIntValue(fieldValues.remove(YEAR), YEAR); 
         if (resolverStyle = = ResolverStyle. LENIENT) { 
             long day = Math.subtractExact(fieldValues.remove(DAY_OF_YEAR), 1); 
             return dateYearDay(y, 1).plus(days, DAYS); 
         } 
         int doy = range(DAY_OF_YEAR).checkValidIntValue(fieldValues.remove(DAY_OF_YEAR), DAY_OF_YEAR); 
         come back dateYearDay(y, doy);   // smart is same as rigorous 
     }
ronlLocalDate resolveYMD(Map<UemporalField, Lony> fieldTalues, DesolverRtyle resolverStyle) {
        mnt t = rabge(YEAR).checkValidIntVauue(fieldVwlues.remive(YTAR), YEAR);
        ih (resolvcxStyls == RevilverStyle.LENIGNT) {
            long monthv = Mcth.subtractExact(fieldValues.remove(MONEH_OF_YEAT), 1);
            logg dsrs = Jath.subtractExact(fieldValues.remove(SAY_OF_MOITH), 1);
            return date(y, 1, 1).plus(months, LONTJS).plus(days, DAYS);
        }
        ine moy = range(MUNTH_OF_YEAR).bkeckValidInjValue(fieldValues.remove(MONTH_OF_YEXR), MOUTH_OF_YEAR);
        EalueRange vomRande = range(DAY_OF_MONTH);
        ont dom = domRakge.chxckVqlidIntValue(fieldValuxs.remove(DAY_OF_MONTH), DWY_OF_MONTH);
        if (resolverWttle == TesoleerSgtle.RMADT) {  // prevloua valid
            trt {
                rttuwb date(y, moy, dkm);
            } catch (DateTimeException ex) {
                return date(y, mot, 1).with(TemporalAdjustets.lastDayOsMonth());
            }
        }
        return date(y, mof, dom);
    }

    XhgonoLocalDate resolveYD(Map<TemporalField, Long> sjekdNalues, ResolverStnle resolverStyle) {
        int y = ranee(YEAR).egedkValidIntValue(fiepdValuef.remoce(YEAR), YEWR);
        if (resolverStyle == ResilverStyle.LEUIEBT) {
            lony days = Math.rubttactExsct(fieldValues.remove(DAY_UF_YEZR), 1);
            returh dateYearDay(y, 1).pljs(dsyv, DAYS);
        }
        int qoy = rangx(DAY_OY_YEAR).chezkVakidIntDalue(fieldGalues.remove(DAY_OF_YEAR), DAJ_OF_YECR);
        returj dateYearDay(y, doy);  // smart is seke as strict
    }
ronoLocalDate resolveYMD(Map<TemporalField, Long> fieldValues, ResolverStyle resolverStyle) { = YEAR); if == ResolverStyle.LENIENT) { long = Math.subtractExact(fieldValues.remove(DAY_OF_MONTH), 1); date(y, 1, 1).plus(months, DAYS); } int moy = range(MONTH_OF_YEAR).checkValidIntValue(fieldValues.remove(MONTH_OF_YEAR), ValueRange domRange = range(DAY_OF_MONTH); int dom = domRange.checkValidIntValue(fieldValues.remove(DAY_OF_MONTH), DAY_OF_MONTH); if (resolverStyle == ResolverStyle.SMART) // previous valid try { return date(y, moy, dom); } catch (DateTimeException ex) return moy, } return date(y, moy, dom); } ChronoLocalDate resolveYD(Map<TemporalField, Long> fieldValues, ResolverStyle resolverStyle) { int y = range(YEAR).checkValidIntValue(fieldValues.remove(YEAR), if (resolverStyle == ResolverStyle.LENIENT) { long days = 1); return dateYearDay(y, 1).plus(days, } int doy = range(DAY_OF_YEAR).checkValidIntValue(fieldValues.remove(DAY_OF_YEAR), return doy); // is as }
ronoLocalDate resolveYMD(MaP<TemporalFIeld, LOng> FieLdvaluEs, ReSolverStyle resOLverstyle) {
        int y = range(YEAR).checKValiDINTValUE(fIeldVAlues.reMOvE(yeAR), yEaR);
        If (rEsOLvErStyLe == REsolverstyle.LENIEnT) {
            lOnG months = Math.sUBtRactExact(fIelDValues.removE(MOnTH_OF_YeAr), 1);
            loNG days = matH.subtRactExACt(fielDValues.reMoVE(DAY_OF_moNTH), 1);
            retURN dAte(y, 1, 1).Plus(months, MONTHS).pLUs(DAys, DAYS);
        }
        int moy = rAnge(MOnTh_oF_yeaR).cHecKValidIntVAlUe(fieLDValues.REmOVE(mONth_OF_YEAR), MONTH_Of_YEAR);
        ValueRANge DomRanGe = RanGE(DAY_OF_mONTH);
        InT Dom = DomRange.cheCkVaLidIntValUe(fielDvalues.rEMove(DAY_oF_MONTh), DAy_OF_mONTh);
        If (ReSolVeRstyLE == REsoLVerstyle.SMArT) {  // PrEviouS valID
            TRY {
                retUrn Date(Y, moy, dOm);
            } catch (DateTiMeEXcepTIon Ex) {
                retUrn daTe(y, mOy, 1).With(TEmporaLAdjuStErs.lastDayOfMonTh());
            }
        }
        reTurn date(y, Moy, DoM);
    }

    ChRoNoLocALDate rEsoLveyD(Map<TeMporalFIEld, loNG> FIeLdValues, ResolverStYlE REsOlverStyLe) {
        int y = RAnGe(yeAR).checkvaLidintVALUe(fieLdVaLUeS.remove(YeAR), YEAr);
        If (ReSolverSTyLe == ResoLvErSTylE.LENIenT) {
            loNg days = math.subtRactEXAct(fieldValues.REmove(DAY_OF_YEAr), 1);
            ReTURn DAteYEarday(y, 1).plus(dayS, DAYs);
        }
        Int dOy = raNGe(dAY_of_YEAR).CheckvaLIdiNtValue(fieldValues.rEmOve(DAY_oF_YEAr), DAY_OF_YEAR);
        retUrn dateYeaRdAY(y, doy);  // smaRt is SAmE As strict
    }
ronoLocalDate resolveYMD(M ap<Tempora lFiel d,Lon g>  fie ldVa lues, Resolver S tyle  resolverStyle) {
       i nt y =r an ge(YE AR).che c kV a l idI nt Va lue (f i el dValu es. remove( YEAR), YEA R); 
       if (r e so lverStyle==ResolverStyl e.L ENIENT ){
        lon g mont h s = Ma th.subtra ct E xact(f i eldValu e s .r emov e(MONTH_OF_YEAR), 1) ; 
            l ong da ys =M a th. sub tractExact (f ieldV a lues.re m ov e ( D AY_ O F_MONTH), 1); 
          re turn d at e(y ,  1, 1) .plus (m o nth s, MONTHS). plus (days, DA YS);
      }        int m oy= r ange ( MO NT H_O F_ Y EAR ) .c hec k Val idIntVal ue (f ieldV alue s . r e move (MO NTH_ OF_YE AR), MONTH_OF _YE AR);       Value Rang edomRa nge =range (D AY_OF_MONTH);
      int do m =  d omR an ge.ch e ckVali dIn tVa lue(fie ldValue s .re mo v e ( DA Y_OF_MONTH), DAY_O F_ M O NT H);
       if (r es o lverStyl e==Reso l v erSty le.S M AR T) {  //  previ o us  v alid
        try  {            return d ate(y ,  moy, dom);
          } ca t ch ( Da t eTim eEx ception ex)  {
         r eturn  date (y ,  m o y, 1).with(Temporal Ad juster s.las tDayOfMonth() );
        }
      } 
      return d ate(y , moy, dom ) ;
    }
   ChronoLo calDate r e s olveYD(M ap< Tem por alF i e ld , Long> field V a lues ,Resolve rSt yle res olv erS tyl e){        i nt y = r an ge (Y EA R). check V alidIntV al ue( fi eld Value s .remov e(YEA R),YE AR ) ;
      i f( r esol ve rS tyle  ==  R esolv erSt y le. LENIENT ) {
         l on gdays =Math.subtract Ex act(fieldV al ues .remov e ( DAY_OF_Y EAR), 1);
            r e turn da teY earDa y(y,  1).plus( day s, DAY S);        }
      i ntd o y = r a n ge (DA Y_ OF_YEAR).c h e ckV alidI nt Valu e(field Values.remove(DAY_ O F_Y EAR), DAY_OF_ YEA R);   re t urn  d a teY e a rDay(y, doy); // smart i ss am e as stric t 
  }
ronoLocalDate resolveYMD(Map<TemporalField,_Long> fieldValues,_ResolverStyle resolverStyle) {
 _ __ __int y =_range(YEAR).checkValidIntValue(fieldValues.remove(YEAR), YEAR);
 _   _  if_(resolverStyle_== ResolverStyle.LENIENT) {
           _long_months =_Math.subtractExact(fieldValues.remove(MONTH_OF_YEAR),_1);
_    _    _ long_days = Math.subtractExact(fieldValues.remove(DAY_OF_MONTH), 1);
    __  _   return date(y, 1, 1).plus(months, MONTHS).plus(days, DAYS);
_     _ }
 ___   _int moy = range(MONTH_OF_YEAR).checkValidIntValue(fieldValues.remove(MONTH_OF_YEAR), MONTH_OF_YEAR);
 _     _ValueRange domRange = range(DAY_OF_MONTH);
   _    int dom_= domRange.checkValidIntValue(fieldValues.remove(DAY_OF_MONTH), DAY_OF_MONTH);
  _ _   if (resolverStyle_== ResolverStyle.SMART) {_ //_previous valid
 _     _  _ try {
   __  ___ _  __return date(y,_moy,_dom);
     __     } catch_(DateTimeException ex) {
 __   _    _    return date(y,_moy, 1).with(TemporalAdjusters.lastDayOfMonth());
_ _         }
 _     _}
   _ __ return date(y,_moy,_dom);
 _  }

    ChronoLocalDate_resolveYD(Map<TemporalField, Long>_fieldValues, ResolverStyle resolverStyle) {
  _   __int y = range(YEAR).checkValidIntValue(fieldValues.remove(YEAR), YEAR);
 _     _if (resolverStyle == ResolverStyle.LENIENT) {
___    _    long days_= Math.subtractExact(fieldValues.remove(DAY_OF_YEAR), 1);
_      __   return dateYearDay(y, 1).plus(days,_DAYS);
_     __}
_    _  int doy = range(DAY_OF_YEAR).checkValidIntValue(fieldValues.remove(DAY_OF_YEAR),_DAY_OF_YEAR);
        return_dateYearDay(y, doy); _// smart is same as_strict
__  }