< prev index next >

src/java.base/share/classes/java/time/Duration.java

Print this page

        

@@ -1192,10 +1192,11 @@
      * This returns the total number of whole seconds in the duration.
      * <p>
      * This instance is immutable and unaffected by this method call.
      *
      * @return the whole seconds part of the length of the duration, positive or negative
+     * @since 9
      */
     public long toSeconds() {
         return seconds;
     }
 

@@ -1241,10 +1242,11 @@
      * This is based on the standard definition of a day as 24 hours.
      * <p>
      * This instance is immutable and unaffected by this method call.
      *
      * @return the number of days in the duration, may be negative
+     * @since 9
      */
     public long toDaysPart(){
         return seconds / SECONDS_PER_DAY;
     }
 

@@ -1256,10 +1258,11 @@
      * This is based on the standard definition of a day as 24 hours.
      * <p>
      * This instance is immutable and unaffected by this method call.
      *
      * @return the number of hours part in the duration, may be negative
+     * @since 9
      */
     public int toHoursPart(){
         return (int) (toHours() % 24);
     }
 

@@ -1271,11 +1274,11 @@
      * This is based on the standard definition of an hour as 60 minutes.
      * <p>
      * This instance is immutable and unaffected by this method call.
      *
      * @return the number of minutes parts in the duration, may be negative
-     * may be negative
+     * @since 9
      */
     public int toMinutesPart(){
         return (int) (toMinutes() % MINUTES_PER_HOUR);
     }
 

@@ -1287,10 +1290,11 @@
      * This is based on the standard definition of a minute as 60 seconds.
      * <p>
      * This instance is immutable and unaffected by this method call.
      *
      * @return the number of seconds parts in the duration, may be negative
+     * @since 9
      */
     public int toSecondsPart(){
         return (int) (seconds % SECONDS_PER_MINUTE);
     }
 

@@ -1304,10 +1308,11 @@
      * The total duration is defined by calling {@link #getNano()} and {@link #getSeconds()}.
      * <p>
      * This instance is immutable and unaffected by this method call.
      *
      * @return the number of milliseconds part of the duration.
+     * @since 9
      */
     public int toMillisPart(){
         return nanos / 1000_000;
     }
 

@@ -1320,10 +1325,11 @@
      * The total duration is defined by calling {@link #getNano()} and {@link #getSeconds()}.
      * <p>
      * This instance is immutable and unaffected by this method call.
      *
      * @return the nanoseconds within the second part of the length of the duration, from 0 to 999,999,999
+     * @since 9
      */
     public int toNanosPart(){
         return nanos;
     }
 
< prev index next >