|
JavaTM 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 Platform Standard Ed. 6 |
|||||||||
| 上一个类 下一个类 | 框架 无框架 | |||||||||
| 摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 | |||||||||
版权所有 2007 Sun Microsystems, Inc. 保留所有权利。 请遵守许可证条款。另请参阅文档重新分发政策。