JavaTM 2 Platform
Standard Ed. 6

org.omg.DynamicAny
接口 DynFixedOperations

所有超级接口:
DynAnyOperations
所有已知子接口:
DynFixed
所有已知实现类:
_DynFixedStub

public interface DynFixedOperations
extends DynAnyOperations

DynFixed 对象支持对 IDL 定值的操作。因为 IDL 没有可以表示固定类型(其具有任意位数和标度)的常规类型,所以操作将使用 IDL 字符串类型。


方法摘要
 String get_value()
          返回 DynFixed 的值。
 boolean set_value(String val)
          设置 DynFixed 的值。
 
从接口 org.omg.DynamicAny.DynAnyOperations 继承的方法
assign, component_count, copy, current_component, destroy, equal, from_any, get_any, get_boolean, get_char, get_double, get_dyn_any, get_float, get_long, get_longlong, get_octet, get_reference, get_short, get_string, get_typecode, get_ulong, get_ulonglong, get_ushort, get_val, get_wchar, get_wstring, insert_any, insert_boolean, insert_char, insert_double, insert_dyn_any, insert_float, insert_long, insert_longlong, insert_octet, insert_reference, insert_short, insert_string, insert_typecode, insert_ulong, insert_ulonglong, insert_ushort, insert_val, insert_wchar, insert_wstring, next, rewind, seek, to_any, type
 

方法详细信息

get_value

String get_value()
返回 DynFixed 的值。


set_value

boolean set_value(String val)
                  throws TypeMismatch,
                         InvalidValue
设置 DynFixed 的值。val 字符串包含的固定字符串常量必须与用于 IDL 固定点字面值的常量具有相同的格式。不过,尾部的 d 或 D 是可选的。如果可以将 val 表示为 DynFixed 而不损失精度,则返回值为 true。如果 val 的小数位数多于 DynFixed 可以表示的位数,则小数位数将被截短,返回值为 false。

抛出:
TypeMismatch - 如果 val 不包含有效固定点字面值,或者包含除前导或尾部空白外的无关字符
InvalidValue - 如果 val 包含值的标度超出 DynFixed 的标度,或者 val 没有被初始化

JavaTM 2 Platform
Standard Ed. 6

提交错误或意见

版权所有 2008 Sun Microsystems, Inc. 保留所有权利。请遵守GNU General Public License, version 2 only