- java.lang.Object
-
- org.omg.CORBA.ContextList
-
public abstract class ContextList extends Object
包含表示属性名称的String对象的可修改列表的对象。 该类用于Request操作,用于描述需要解析并通过调用发送的上下文。 (通过给出属性名称并返回与其关联的值来解决上下文)。这可以通过调用Context方法get_values并从ContextList对象提供一个字符串作为第三个参数来完成。 方法get_values返回包含NVList对象的NamedValue对象,该对象保存由给定字符串标识的值。一个
ContextList对象由ORB创建,如下所示:ORB orb = ORB.init(args, null); org.omg.CORBA.ContextList ctxList = orb.create_context_list();变量ctxList表示一个空的ContextList对象。 字符串被添加到列表中与该方法add,该方法访问item,并用该方法除去remove。- 从以下版本开始:
- JDK1.2
- 另请参见:
-
Context
-
-
构造方法摘要
构造方法 Constructor 描述 ContextList()
-
-
-
方法详细信息
-
count
public abstract int count()
返回此String对象中的ContextList对象的数量。- 结果
-
一个
int表示的数目String在该SContextList对象
-
add
public abstract void add(String ctx)
添加一个String对象本ContextList对象。- 参数
-
ctx- 要添加的String对象
-
item
public abstract String item(int index) throws Bounds
返回给定索引处的String对象。- 参数
-
index- 所需字符串的索引,0为第一个字符串的索引 - 结果
- 给定索引处的字符串
- 异常
-
Bounds- 如果索引大于或等于此ContextList对象中的字符串数
-
-