| 
JavaTM 2 Platform Standard Ed. 5.0  | 
|||||||||
| 前のクラス 次のクラス | フレームあり フレームなし | |||||||||
| 概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド | |||||||||
java.lang.Objectjava.util.concurrent.atomic.AtomicReferenceArray<E>
E - この配列に含まれる要素の基底クラスpublic class AtomicReferenceArray<E>
要素を原子的に更新可能なオブジェクト参照の配列です。原子変数のプロパティの詳細は、java.util.concurrent.atomic パッケージ仕様を参照してください。
| コンストラクタの概要 | |
|---|---|
AtomicReferenceArray(E[] array)
指定された配列と同じ長さの AtomicReferenceArray を新しく作成します。  | 
|
AtomicReferenceArray(int length)
指定された長さの新しい AtomicReferenceArray を作成します。  | 
|
| メソッドの概要 | |
|---|---|
 boolean | 
compareAndSet(int i,
              E expect,
              E update)
「現在の値 == 予想される値」である場合、値を指定された更新値に原子的に設定します。  | 
 E | 
get(int i)
位置 i の現在値を取得します。  | 
 E | 
getAndSet(int i,
          E newValue)
位置 i の要素を指定された値に設定して、以前の値を返します。  | 
 int | 
length()
配列の長さを返します。  | 
 void | 
set(int i,
    E newValue)
位置 i の要素を指定された値に設定します。  | 
 String | 
toString()
配列の現在値の文字列表現を返します。  | 
 boolean | 
weakCompareAndSet(int i,
                  E expect,
                  E update)
「現在の値 == 予想される値」である場合、値を指定された更新値に原子的に設定します。  | 
| クラス java.lang.Object から継承されたメソッド | 
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait | 
| コンストラクタの詳細 | 
|---|
public AtomicReferenceArray(int length)
length - 配列の長さpublic AtomicReferenceArray(E[] array)
array - 要素のコピー元の配列
NullPointerException - 配列が null の場合| メソッドの詳細 | 
|---|
public final int length()
public final E get(int i)
i - インデックス
public final void set(int i,
                      E newValue)
i - インデックスnewValue - 新しい値
public final E getAndSet(int i,
                         E newValue)
i - インデックスnewValue - 新しい値
public final boolean compareAndSet(int i,
                                   E expect,
                                   E update)
i - インデックスexpect - 予想される値update - 新しい値
public final boolean weakCompareAndSet(int i,
                                       E expect,
                                       E update)
i - インデックスexpect - 予想される値update - 新しい値
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 も参照してください。