Пример #1
0
        /// <summary>
        /// Gets the resolved result of the parse.
        /// </summary>
        /// <returns> the result of the parse, not null </returns>
        internal TemporalAccessor ToResolved(ResolverStyle resolverStyle, Set <TemporalField> resolverFields)
        {
            Parsed parsed = CurrentParsed();

            parsed.Chrono = EffectiveChronology;
            parsed.Zone   = (parsed.Zone != null ? parsed.Zone : Formatter.Zone);
            return(parsed.Resolve(resolverStyle, resolverFields));
        }
Пример #2
0
 public static ResolverStyle valueOf(string name)
 {
     foreach (ResolverStyle enumInstance in ResolverStyle.values())
     {
         if (enumInstance.nameValue == name)
         {
             return(enumInstance);
         }
     }
     throw new System.ArgumentException(name);
 }
Пример #3
0
 //-----------------------------------------------------------------------
 /// <summary>
 /// Resolves the fields in this context.
 /// </summary>
 /// <param name="resolverStyle">  the resolver style, not null </param>
 /// <param name="resolverFields">  the fields to use for resolving, null for all fields </param>
 /// <returns> this, for method chaining </returns>
 /// <exception cref="DateTimeException"> if resolving one field results in a value for
 ///  another field that is in conflict </exception>
 internal TemporalAccessor Resolve(ResolverStyle resolverStyle, Set <TemporalField> resolverFields)
 {
     if (resolverFields != java.time.temporal.TemporalAccessor_Fields.Null)
     {
         FieldValues.Keys.retainAll(resolverFields);
     }
     this.ResolverStyle = resolverStyle;
     ResolveFields();
     ResolveTimeLenient();
     CrossCheck();
     ResolvePeriod();
     ResolveFractional();
     ResolveInstant();
     return(this);
 }