src/java.base/share/classes/java/util/concurrent/atomic/AtomicLong.java
changeset 55033 c72451a9f67e
parent 47216 71c04702a3d5
child 58138 1e4270f875ee
equal deleted inserted replaced
55032:11d9cd8d99f3 55033:c72451a9f67e
   362 
   362 
   363     /**
   363     /**
   364      * Returns the current value of this {@code AtomicLong} as an {@code int}
   364      * Returns the current value of this {@code AtomicLong} as an {@code int}
   365      * after a narrowing primitive conversion,
   365      * after a narrowing primitive conversion,
   366      * with memory effects as specified by {@link VarHandle#getVolatile}.
   366      * with memory effects as specified by {@link VarHandle#getVolatile}.
   367      * @jls 5.1.3 Narrowing Primitive Conversions
   367      * @jls 5.1.3 Narrowing Primitive Conversion
   368      */
   368      */
   369     public int intValue() {
   369     public int intValue() {
   370         return (int)get();
   370         return (int)get();
   371     }
   371     }
   372 
   372 
   381 
   381 
   382     /**
   382     /**
   383      * Returns the current value of this {@code AtomicLong} as a {@code float}
   383      * Returns the current value of this {@code AtomicLong} as a {@code float}
   384      * after a widening primitive conversion,
   384      * after a widening primitive conversion,
   385      * with memory effects as specified by {@link VarHandle#getVolatile}.
   385      * with memory effects as specified by {@link VarHandle#getVolatile}.
   386      * @jls 5.1.2 Widening Primitive Conversions
   386      * @jls 5.1.2 Widening Primitive Conversion
   387      */
   387      */
   388     public float floatValue() {
   388     public float floatValue() {
   389         return (float)get();
   389         return (float)get();
   390     }
   390     }
   391 
   391 
   392     /**
   392     /**
   393      * Returns the current value of this {@code AtomicLong} as a {@code double}
   393      * Returns the current value of this {@code AtomicLong} as a {@code double}
   394      * after a widening primitive conversion,
   394      * after a widening primitive conversion,
   395      * with memory effects as specified by {@link VarHandle#getVolatile}.
   395      * with memory effects as specified by {@link VarHandle#getVolatile}.
   396      * @jls 5.1.2 Widening Primitive Conversions
   396      * @jls 5.1.2 Widening Primitive Conversion
   397      */
   397      */
   398     public double doubleValue() {
   398     public double doubleValue() {
   399         return (double)get();
   399         return (double)get();
   400     }
   400     }
   401 
   401