|
JavaTM 2 Platform Standard Ed. 5.0 |
|||||||||
| 前のクラス 次のクラス | フレームあり フレームなし | |||||||||
| 概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド | |||||||||
java.lang.Objectjava.util.concurrent.atomic.AtomicLongArray
public class AtomicLongArray
要素の原子的な更新が可能な long 配列です。原子変数のプロパティの詳細は、java.util.concurrent.atomic パッケージ仕様を参照してください。
| コンストラクタの概要 | |
|---|---|
AtomicLongArray(int length)
指定された長さの新しい AtomicLongArray を作成します。 |
|
AtomicLongArray(long[] array)
指定された配列と同じ長さの AtomicLongArray を新しく作成します。 |
|
| メソッドの概要 | |
|---|---|
long |
addAndGet(int i,
long delta)
インデックス i の要素に指定された値を原子的に追加します。 |
boolean |
compareAndSet(int i,
long expect,
long update)
「現在の値 == 予想される値」である場合、値を指定された更新値に原子的に設定します。 |
long |
decrementAndGet(int i)
インデックス i の要素を原子的に減分します。 |
long |
get(int i)
位置 i の現在値を取得します。 |
long |
getAndAdd(int i,
long delta)
インデックス i の要素に指定された値を原子的に追加します。 |
long |
getAndDecrement(int i)
インデックス i の要素を 1 だけ原子的に減分します。 |
long |
getAndIncrement(int i)
インデックス i の要素を 1 だけ原子的に増分します。 |
long |
getAndSet(int i,
long newValue)
位置 i の要素を指定された値に設定して、以前の値を返します。 |
long |
incrementAndGet(int i)
インデックス i で、要素を原子的に増分します。 |
int |
length()
配列の長さを返します。 |
void |
set(int i,
long newValue)
位置 i の要素を指定された値に設定します。 |
String |
toString()
配列の現在値の文字列表現を返します。 |
boolean |
weakCompareAndSet(int i,
long expect,
long update)
「現在の値 == 予想される値」である場合、値を指定された更新値に原子的に設定します。 |
| クラス java.lang.Object から継承されたメソッド |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| コンストラクタの詳細 |
|---|
public AtomicLongArray(int length)
length - 配列の長さpublic AtomicLongArray(long[] array)
array - 要素のコピー元の配列
NullPointerException - 配列が null の場合| メソッドの詳細 |
|---|
public final int length()
public final long get(int i)
i - インデックス
public final void set(int i,
long newValue)
i - インデックスnewValue - 新しい値
public final long getAndSet(int i,
long newValue)
i - インデックスnewValue - 新しい値
public final boolean compareAndSet(int i,
long expect,
long update)
i - インデックスexpect - 予想される値update - 新しい値
public final boolean weakCompareAndSet(int i,
long expect,
long update)
i - インデックスexpect - 予想される値update - 新しい値
public final long getAndIncrement(int i)
i - インデックス
public final long getAndDecrement(int i)
i - インデックス
public final long getAndAdd(int i,
long delta)
i - インデックスdelta - 追加する値
public final long incrementAndGet(int i)
i - インデックス
public final long decrementAndGet(int i)
i - インデックス
public long addAndGet(int i,
long delta)
i - インデックスdelta - 追加する値
public String toString()
Object 内の toString
|
JavaTM 2 Platform Standard Ed. 5.0 |
|||||||||
| 前のクラス 次のクラス | フレームあり フレームなし | |||||||||
| 概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド | |||||||||
Copyright 2004 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms. Documentation Redistribution Policy も参照してください。