//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @SuppressWarnings("unchecked") @Override public <R> R query(java.time.temporal.TemporalQuery<R> query) public override R query <R>(TemporalQuery <R> query) { if (query == TemporalQueries.ZoneId()) { return((R)Zone); } else if (query == TemporalQueries.Chronology()) { return((R)Chrono); } else if (query == TemporalQueries.LocalDate()) { return((R)(Date != java.time.temporal.TemporalAccessor_Fields.Null ? LocalDate.From(Date) : java.time.temporal.TemporalAccessor_Fields.Null)); } else if (query == TemporalQueries.LocalTime()) { return((R)Time); } else if (query == TemporalQueries.Zone() || query == TemporalQueries.Offset()) { return(query.QueryFrom(this)); } else if (query == TemporalQueries.Precision()) { return(java.time.temporal.TemporalAccessor_Fields.Null); // not a complete date/time } // inline TemporalAccessor.super.query(query) as an optimization // non-JDK classes are not permitted to make this optimization return(query.QueryFrom(this)); }
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @SuppressWarnings("unchecked") @Override public <R> R query(java.time.temporal.TemporalQuery<R> query) public override R query <R>(TemporalQuery <R> query) { if (query == TemporalQueries.Chronology()) { return((R)EffectiveChrono); } if (query == TemporalQueries.ZoneId()) { return((R)EffectiveZone); } if (query == TemporalQueries.Precision()) { return(Temporal.query(query)); } return(query.QueryFrom(this)); }