|
JavaTM 2 Platform Standard Ed. 6 |
|||||||||
| 上一個類別 下一個類別 | 框架 無框架 | |||||||||
| 摘要: 巢狀 | 欄位 | 建構子 | 方法 | 詳細資訊: 欄位 | 建構子 | 方法 | |||||||||
java.lang.Objectorg.omg.CORBA.ContextList
public abstract class ContextList
一個物件,它包含表示屬性名稱的 String 物件所組成的可修改列表。此類別在 Request 操作中使用,用於描述需要解析並與調用一起發送的上下文。(上下文是通過給定屬性名稱並取回與之關聯的值來解析的。)這通過調用 Context 方法 get_values 並提供取自 ContextList 物件的字元串作為第三個參數來實作。get_values 方法返回一個套件含 NamedValue 物件的 NVList 物件,NamedValue 保存由給定字元串標識的值。
ContextList 物件由 ORB 創建,如下所示:
ORB orb = ORB.init(args, null); org.omg.CORBA.ContextList ctxList = orb.create_context_list();變數
ctxList 表示空 ContextList 物件。使用方法 add 將 String 添加到列表中,使用方法 item 存取,使用方法 remove 刪除。
Context| 建構子摘要 | |
|---|---|
ContextList()
|
|
| 方法摘要 | |
|---|---|
abstract void |
add(String ctx)
將 String 物件添加到此 ContextList 物件中。 |
abstract int |
count()
返回此 ContextList 物件中的 String 物件數。 |
abstract String |
item(int index)
返回位於給定索引的 String 物件。 |
abstract void |
remove(int index)
移除給定索引處的 String 物件。 |
| 從類別 java.lang.Object 繼承的方法 |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| 建構子詳細資訊 |
|---|
public ContextList()
| 方法詳細資訊 |
|---|
public abstract int count()
ContextList 物件中的 String 物件數。
ContextList 物件中 String 數量的 intpublic abstract void add(String ctx)
String 物件添加到此 ContextList 物件中。
ctx - 要添加的 String 物件
public abstract String item(int index)
throws Bounds
String 物件。
index - 所需字元串的索引,其中 0 為第一個字元串的索引
Bounds - 如果索引大於或等於此 ContextList 物件中的字元串數
public abstract void remove(int index)
throws Bounds
String 物件。注意,被移除物件後面的所有字元串的索引都向下移動一位。
index - 將要移除的 String 物件的索引,0 表示第一個字元串
Bounds - 如果該索引大於或等於此 ContextList 物件中的 String 物件數
|
JavaTM 2 Platform Standard Ed. 6 |
|||||||||
| 上一個類別 下一個類別 | 框架 無框架 | |||||||||
| 摘要: 巢狀 | 欄位 | 建構子 | 方法 | 詳細資訊: 欄位 | 建構子 | 方法 | |||||||||
版權所有 2008 Sun Microsystems, Inc. 保留所有權利。請遵守GNU General Public License, version 2 only。