jdk/src/share/classes/java/time/temporal/TemporalQuery.java
changeset 15658 55b829ca2334
parent 15289 3ac550392e43
child 16852 60207b2b4b42
equal deleted inserted replaced
15657:c588664d547e 15658:55b829ca2334
    96  * This interface places no restrictions on the mutability of implementations,
    96  * This interface places no restrictions on the mutability of implementations,
    97  * however immutability is strongly recommended.
    97  * however immutability is strongly recommended.
    98  *
    98  *
    99  * @since 1.8
    99  * @since 1.8
   100  */
   100  */
       
   101 @FunctionalInterface
   101 public interface TemporalQuery<R> {
   102 public interface TemporalQuery<R> {
   102 
   103 
   103     /**
   104     /**
   104      * Queries the specified temporal object.
   105      * Queries the specified temporal object.
   105      * <p>
   106      * <p>
   126      * It may use any method on {@code TemporalAccessor} to determine the result.
   127      * It may use any method on {@code TemporalAccessor} to determine the result.
   127      * The input object must not be altered.
   128      * The input object must not be altered.
   128      * <p>
   129      * <p>
   129      * The input temporal object may be in a calendar system other than ISO.
   130      * The input temporal object may be in a calendar system other than ISO.
   130      * Implementations may choose to document compatibility with other calendar systems,
   131      * Implementations may choose to document compatibility with other calendar systems,
   131      * or reject non-ISO temporal objects by {@link Queries#chrono() querying the chronology}.
   132      * or reject non-ISO temporal objects by {@link Queries#chronology() querying the chronology}.
   132      * <p>
   133      * <p>
   133      * This method may be called from multiple threads in parallel.
   134      * This method may be called from multiple threads in parallel.
   134      * It must be thread-safe when invoked.
   135      * It must be thread-safe when invoked.
   135      *
   136      *
   136      * @param temporal  the temporal object to query, not null
   137      * @param temporal  the temporal object to query, not null