Content deleted Content added
added →Atomic wrapper classes |
→Atomic wrapper classes: expand to list all of the atomic wrapper classes |
||
Line 33:
== Atomic wrapper classes ==
With Java 5.0, additional wrapper classes were introduced in the {{Javadoc:SE|package=java.util.concurrent.atomic|java/util/concurrent/atomic}} package
The atomic wrapper classes and their corresponding primitive types are:
:{| class="wikitable"
! Primitive type !! Wrapper class
|-
| <code>int</code> || {{Javadoc:SE|java/util/concurrent/atomic|AtomicInteger}}
|-
| <code>long</code> || {{Javadoc:SE|java/util/concurrent/atomic|AtomicLong}}
|-
| <code>boolean</code> || {{Javadoc:SE|java/util/concurrent/atomic|AtomicBoolean}}
|-
| <code>V</code> || {{Javadoc:SE|class=AtomicReference<V>|java/util/concurrent/atomic|AtomicReference}}
|}
The <code>AtomicReference</code> class accepts the [[TypeParameter|type parameter]] <code>V</code> that specifies the type of the object [[reference (computer science)|reference]]. (See "[[Generic programming#Generics in Java]]" for a description of type parameters in Java.)
== See also ==
|