集合对象可能包括任何数据类型的元素。
Collection objects might contain elements of any data types.
对于完整的、用途单一的集合,如功能规范、信息规划和快速参考指南,您可以将这类专门化的topicref元素打包成新的映射类型。
For complete, single-purpose collections such as functional specifications, information plans, and quick reference guides, you might package these specialized topicref elements with a new map type.
在尝试向泛型集合(本例中为List)添加错误类型的元素时,清单2中的程序会生成编译时错误消息。
Listing 2 contains a program that generates the compilation-time error message that happens when you try to add the wrong type of element to a generic collection - a List in this case.
与任何容器类型一样,可以使用内置的len方法查明集合中元素的数量。
As is the case with any container type, you can use the built-in len method to find out how many items are in the collection.
为了防止没有带有前缀的匹配关键词的情况(比如列表4中的model.ownedMember)出现,集合中所有类型符合的元素都必须通过关联UmlClass2Table进行映射。
In case there is no prefixed match keyword (for instance, model.ownedMember in Listing 4), then every type-conforming element of the collection must be mapped by the relation UmlClass2Table.
集合可以是值类型的(元素或组合元素),也可以是实体引用类型的(one - to - many或many - to - many关联)。
Collections can either model value types (element or composite-element) or entity reference types (one-to-many or many-to-many associations).
只要记住集合中的元素可能有多种类型(元素、文本或者属性),就能更好地编写路径并保证得到预期的结果。
By keeping in mind that a set can have more than one type (elements, text, or attributes), you'll be able to write those paths a lot better, and ensure they evaluate to what you want.
例如,有多种方法来描述一个集合中的值,这个集合可以是多种多样的:xs:choice、元素替代组、抽象元素、抽象类型以及更多。
For example, there are multiple ways to describe values from a set that may vary: xs: choice, element substitution groups, abstract elements, abstract types, and many more.
要从集合中提取元素,您必须知道集合中对象的类型,以将其强制转换为合适的局部变量。
To fetch elements from the collection, you had to know the type of object in the collection so you could cast it back to the appropriate local variable.
弱类型的集合对象、包含空元素的数组和特定的本地数据类型都给互操作性带来一定的问题,特别是
Weakly-typed collection objects, arrays containing null elements, and certain native data types all pose special problems for interoperability. Specifically
用于数组类型的组件的值可以包含0个或1个元素,用于集合和树类型的组件的值可以包含0到多个元素。
Values for array type components can contain zero or one element, and values for set and tree type components can have zero or more elements.
如果指定元素的类型与集合不相容时抛出(可选)。
ClassCastException - if the type of the specified element is incompatible with this collection (optional).
如果指定集合的一个或多个元素的类型与集合不相容时抛出(可选)。
ClassCastException - if the types of one or more elements in this collection are incompatible with the specified collection (optional).
本文揭示了Q分析法是研究同一集合或两个不同集合元素之间的关系类型的一种结构语言。
This paper indicates that Q analytical method is a structural language to study the relational kind between elements of one set and of two different sets.
DTD是通过SGML应用程序来使用的,就像HTML,来指明适用于特殊类型的文档标记,包括元素集合和特殊个体的声明。
DTD is used by SGML applications, such as HTML, to specify rules that apply to the markup of documents of a particular type, including a set of element and entity declarations.
我们可以使用其元素类型是数组的元素类型的一个子类型的任何集合调用这个方法。
We can call this method with any kind of collection whose element type is a supertype of the element type of the array.
从绑定元素集合中移除一个具有指定类型的绑定元素。
Removes a binding element of a specified type from the collection of binding elements.
如果指定数组的运行时类型不是集合中每个元素运行时类型的父一级类型时抛出。
ArrayStoreException - the runtime type of the specified array is not a supertype of the runtime type of every element in this collection.
数组类型同样是派生类型,它描述了某种对象的连续的非空集合,由其中元素类型和元素个数来刻画。
An array type describes a contiguously allocated nonempty set of objects with a particular member object type, called the element type.
返回包含集合所有元素的数组,返回数组的运行时类型由指定数组的运行时类型决定。
Returns an array containing all of the elements in this collection; the runtime type of the returned array is that of the specified array.
如果指定集合的一个或多个元素的类型与集合不相容时抛出(可选)。
ClassCastException - if the types of one or more elements in the specified collection are incompatible with this collection (optional).
如果范围变量是显式类型的,请确保该类型与循环访问的集合中的元素类型相同或可从该类型隐式转换。
If the range variable is explicitly typed, make sure that the type is either the same as, or implicitly convertible from, the type of the elements in the collection it iterates.
如果指定数组的运行时类型不是集合中每个元素运行时类型的父一级类型时抛出。
ArrayStoreException - if the runtime type of the specified array is not a supertype of the runtime type of every element in this collection.
如果指定集合的某个元素类型阻止其加入集合时抛出。
ClassCastException - if the class of an element of the specified collection prevents it from being added to this collection.
如果指定集合的某个元素类型阻止其加入集合时抛出。
ClassCastException - if the class of an element of the specified collection prevents it from being added to this collection.
应用推荐