|
JavaTM 2 Platform Standard Ed. 5.0 |
|||||||||
ÀÌÀü Ŭ·¡½º ´ÙÀ½ Ŭ·¡½º | ÇÁ·¹ÀÓÀ¸·Î ÇÁ·¹ÀÓ ¾øÀÌ | |||||||||
°³¿ä: NESTED | Çʵå | constructor | ¸Þ¼µå | »ó¼¼: Çʵå | »ý¼ºÀÚ | ¸Þ¼µå |
java.lang.Objectjava.lang.Number
java.util.concurrent.atomic.AtomicInteger
public class AtomicInteger
¿øÀÚÀûÀ¸·Î °»½Å °¡´ÉÇÑ int Ä¡ÀÔ´Ï´Ù. ¿øÀÚ º¯¼öÀÇ ÇÁ·ÎÆÛƼÀÇÀÚ¼¼ÇÑ ³»¿ëÀº java.util.concurrent.atomic
ÆÐŰÁö »ç¾çÀ» ÂüÁ¶ÇϽʽÿÀ. AtomicInteger´Â
¿øÀÚÀûÀ¸·Î ÁõºÐ µÇ´Â Ä«¿îÅ͵îÀÇ ¾îÇø®ÄÉÀ̼ÇÀ¸·Î »ç¿ëµË´Ï´Ù. À̰ÍÀ» Integer
´ëü·Î¼ »ç¿ëÇÒ ¼ö ¾ø½À´Ï´Ù. ´Ù¸¸, ÀÌ Å¬·¡½º´Â Number¸¦ È®ÀåÇØ, ¼öÄ¡ º£À̽ºÀÇ Å¬·¡½º¸¦ ó¸®ÇÏ´Â ÅøÀ̳ª À¯Æ¿¸®Æ¼¿¡
ÇÑ ´ÜÀÏÀûÀÎ ¾×¼¼½º¸¦ Çã¿ëÇÕ´Ï´Ù.
»ý¼ºÀÚ °³¿ä | |
---|---|
AtomicInteger ()
ÃʱⰪ 0À» »ç¿ëÇØ, »õ·Î¿î AtomicInteger¸¦ ÀÛ¼ºÇÕ´Ï´Ù. |
|
AtomicInteger (int initialValue)
ÁöÁ¤µÈ ÃʱⰪÀ» »ç¿ëÇØ, »õ·Î¿î AtomicInteger¸¦ ÀÛ¼ºÇÕ´Ï´Ù. |
¸Þ¼µå °³¿ä | |
---|---|
int |
addAndGet (int delta)
ÇöÀçÀÇ °ªÀ¸·Î ÁöÁ¤µÈ °ªÀ» ¿øÀÚÀûÀ¸·Î Ãß°¡ÇÕ´Ï´Ù. |
boolean |
compareAndSet (int expect,
int update)
¡¸ÇöÀçÀÇ °ª == ¿¹»óµÇ´Â °ª¡¹ÀÎ °æ¿ì, °ªÀÌ ÁöÁ¤µÈ °»½ÅÄ¡¿¡ ¿øÀÚÀûÀ¸·Î ¼³Á¤ÇÕ´Ï´Ù. |
int |
decrementAndGet ()
ÇöÀçÀÇ °ªÀ» 1 ¸¸ ¿øÀÚÀûÀ¸·Î °¨ ºÐ ÇÕ´Ï´Ù. |
double |
doubleValue ()
ÁöÁ¤µÈ °ªÀ» double ÇüÀ¸·Î¼ ¸®ÅÏÇÕ´Ï´Ù. |
float |
floatValue ()
ÁöÁ¤µÈ ¼öÄ¡¸¦ float ÇüÀ¸·Î¼ ¸®ÅÏÇÕ´Ï´Ù. |
int |
get ()
ÇöÀçÀÇ °ªÀ» ÃëµæÇÕ´Ï´Ù. |
int |
getAndAdd (int delta)
ÇöÀçÀÇ °ªÀ¸·Î ÁöÁ¤µÈ °ªÀ» ¿øÀÚÀûÀ¸·Î Ãß°¡ÇÕ´Ï´Ù. |
int |
getAndDecrement ()
ÇöÀçÀÇ °ªÀ» 1 ¸¸ ¿øÀÚÀûÀ¸·Î °¨ ºÐ ÇÕ´Ï´Ù. |
int |
getAndIncrement ()
ÇöÀçÀÇ °ªÀ» 1 ¸¸ ¿øÀÚÀûÀ¸·Î ÁõºÐ ÇÕ´Ï´Ù. |
int |
getAndSet (int newValue)
ÁöÁ¤µÈ °ªÀ¸·Î ¼³Á¤ÇØ, ÀÌÀüÀÇ °ªÀ» ¸®ÅÏÇÕ´Ï´Ù. |
int |
incrementAndGet ()
ÇöÀçÀÇ °ªÀ» 1 ¸¸ ¿øÀÚÀûÀ¸·Î ÁõºÐ ÇÕ´Ï´Ù. |
int |
intValue ()
ÁöÁ¤µÈ °ªÀ» int ÇüÀ¸·Î¼ ¸®ÅÏÇÕ´Ï´Ù. |
long |
longValue ()
ÁöÁ¤µÈ ¼öÄ¡¸¦ long ÇüÀ¸·Î¼ ¸®ÅÏÇÕ´Ï´Ù. |
void |
set (int newValue)
ÁöÁ¤µÈ °ªÀ¸·Î ¼³Á¤ÇÕ´Ï´Ù. |
String |
toString ()
ÇöÀç°¡ÀÇ Ä³¸¯ÅÍ ¶óÀΠǥ±â¸¦ ¸®ÅÏÇÕ´Ï´Ù. |
boolean |
weakCompareAndSet (int expect,
int update)
¡¸ÇöÀçÀÇ °ª == ¿¹»óµÇ´Â °ª¡¹ÀÎ °æ¿ì, °ªÀÌ ÁöÁ¤µÈ °»½ÅÄ¡¿¡ ¿øÀÚÀûÀ¸·Î ¼³Á¤ÇÕ´Ï´Ù. |
Ŭ·¡½º java.lang. Number ·ÎºÎÅÍ »ó¼ÓµÈ ¸Þ¼µå |
---|
byteValue,
shortValue |
Ŭ·¡½º java.lang. Object ·ÎºÎÅÍ »ó¼ÓµÈ ¸Þ¼µå |
---|
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
»ý¼ºÀÚ »ó¼¼ |
---|
public AtomicInteger(int initialValue)
initialValue
- ÃʱⰪ
public AtomicInteger()
¸Þ¼µåÀÇ »ó¼¼ |
---|
public final int get()
public final void set(int newValue)
newValue
- »õ·Î¿î °ªpublic final int getAndSet(int newValue)
newValue
- »õ·Î¿î °ª
public final boolean compareAndSet(int expect, int update)
expect
- ¿¹»óµÇ´Â °ªupdate
- »õ·Î¿î °ª
public final boolean weakCompareAndSet(int expect, int update)
expect
- ¿¹»óµÇ´Â °ªupdate
- »õ·Î¿î °ª
public final int getAndIncrement()
public final int getAndDecrement()
public final int getAndAdd(int delta)
delta
- Ãß°¡ÇÏ´Â °ª
public final int incrementAndGet()
public final int decrementAndGet()
public final int addAndGet(int delta)
delta
- Ãß°¡ÇÏ´Â °ª
public String toString()
Object
³»ÀÇ toString
public int intValue()
Number
񃬣: int
ÇüÀ¸·Î¼ ¸®ÅÏÇÕ´Ï´Ù. °ªÀ» ¸»°Å³ª Àß¶ó ¹ö¸®°Å³ª ÇÏ´Â Àϵµ ÀÖ½À´Ï´Ù.
Number
³»ÀÇ intValue
int
ÇüÀ¸·Î º¯È¯ÇÑ °ªpublic long longValue()
Number
񃬣: long
ÇüÀ¸·Î¼ ¸®ÅÏÇÕ´Ï´Ù. °ªÀ» ¸»°Å³ª Àß¶ó ¹ö¸®°Å³ª ÇÏ´Â Àϵµ ÀÖ½À´Ï´Ù.
Number
³»ÀÇ longValue
long
ÇüÀ¸·Î º¯È¯ÇÑ °ªpublic float floatValue()
Number
񃬣: float
ÇüÀ¸·Î¼ ¸®ÅÏÇÕ´Ï´Ù. °ªÀ» ¸¶´Â Àϵµ ÀÖ½À´Ï´Ù.
Number
³»ÀÇ floatValue
float
ÇüÀ¸·Î º¯È¯ÇÑ °ªpublic double doubleValue()
Number
񃬣: double
ÇüÀ¸·Î¼ ¸®ÅÏÇÕ´Ï´Ù. °ªÀ» ¸¶´Â Àϵµ ÀÖ½À´Ï´Ù.
Number
³»ÀÇ doubleValue
double
ÇüÀ¸·Î º¯È¯ÇÑ °ª
|
JavaTM 2 Platform Standard Ed. 5.0 |
|||||||||
ÀÌÀü Ŭ·¡½º ´ÙÀ½ Ŭ·¡½º | ÇÁ·¹ÀÓÀ¸·Î ÇÁ·¹ÀÓ ¾øÀÌ | |||||||||
°³¿ä: NESTED | Çʵå | constructor | ¸Þ¼µå | »ó¼¼: Çʵå | »ý¼ºÀÚ | ¸Þ¼µå |
Copyright 2004 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms . Documentation Redistribution Policy µµ ÂüÁ¶ÇϽʽÿÀ.