jdk/src/share/classes/java/time/temporal/TemporalQuery.java
changeset 17474 8c100beabcc0
parent 16852 60207b2b4b42
child 20795 8ec9e5b79828
equal deleted inserted replaced
17473:35cd9b3a98ff 17474:8c100beabcc0
    94  * <p>
    94  * <p>
    95  * The most common implementations are method references, such as
    95  * The most common implementations are method references, such as
    96  * {@code LocalDate::from} and {@code ZoneId::from}.
    96  * {@code LocalDate::from} and {@code ZoneId::from}.
    97  * Additional common implementations are provided on this interface as static methods.
    97  * Additional common implementations are provided on this interface as static methods.
    98  *
    98  *
    99  * <h3>Specification for implementors</h3>
    99  * @implSpec
   100  * This interface places no restrictions on the mutability of implementations,
   100  * This interface places no restrictions on the mutability of implementations,
   101  * however immutability is strongly recommended.
   101  * however immutability is strongly recommended.
   102  *
   102  *
   103  * @since 1.8
   103  * @since 1.8
   104  */
   104  */
   122      *   temporal = temporal.query(thisQuery);
   122      *   temporal = temporal.query(thisQuery);
   123      * </pre>
   123      * </pre>
   124      * It is recommended to use the second approach, {@code query(TemporalQuery)},
   124      * It is recommended to use the second approach, {@code query(TemporalQuery)},
   125      * as it is a lot clearer to read in code.
   125      * as it is a lot clearer to read in code.
   126      *
   126      *
   127      * <h3>Specification for implementors</h3>
   127      * @implSpec
   128      * The implementation must take the input object and query it.
   128      * The implementation must take the input object and query it.
   129      * The implementation defines the logic of the query and is responsible for
   129      * The implementation defines the logic of the query and is responsible for
   130      * documenting that logic.
   130      * documenting that logic.
   131      * It may use any method on {@code TemporalAccessor} to determine the result.
   131      * It may use any method on {@code TemporalAccessor} to determine the result.
   132      * The input object must not be altered.
   132      * The input object must not be altered.