How can I assign an enumerated type value to a variable?
我怎么可以指定枚举类型的值给一个变量?
The category attribute is an enumerated type. It's one of the following.
category属性是枚举类型。
The main method following the enumerated type definition demonstrates the usage.
位于枚举类型定义之后的main方法演示了这种用法。
To make it clear, Listing 3 shows how to implement the TopicCategory enumerated type.
为了明确这一点,清单3展示了TopicCategory枚举类型是如何实现的。
Finally, an enumerated type may, in a Schema, be part of a union with a primitive type.
最后,模式(Schema)中的枚举类型可能是原始类型的联合(union)的一个组成部分。
Such a type is called an enumerated type, and the values it contains are called enumerations.
这样一个类型被称为枚举类型,它所包含的值被称为枚举值。
The values method of the enumerated type returns an ordered array of the different values of that type.
该枚举类型的values方法返回这种类型的不同值的有序数组。
This concept is getting more into the area of treating each element of an enumerated type as a subclass.
这个概念正在深入到将枚举类型的每个元素作为一个子类对待的领域。
We can see that our Breed enumerated type contains several variables of type Value, as in the following example.
你可以看到我们的Breed枚举类型包含了几种Value 类型的值,像下面的例子所展示的。
The type attribute of the PostalAddress element is actually an enumerated type, allowing a choice of one of four strings.
PostalAddress元素的type属性实际上是枚举类型,它允许选择4 个字符串之一。
The XML Forms Generator detects the need for an open selection through the use of a custom ECore annotation on an element or attribute that has an enumerated type.
XMLFormsGenerator通过在具有枚举类型的元素或属性上使用定制的ECore注释,检测对于open选择的需要。
An enumerated type is one that has valid values limited to a set of constants. For instance, an enumeration may be defined for the colors of a stop light as follows.
枚举类型是一种有效取值仅限于一组常量的类型。
Also, an enumerated type is supplied via its Class object, along with the type of the Map's values (in this case, simple strings). The output of this method is shown in Listing 11.
而且,枚举值是通过其Class对象提供的,同时提供的还有映射值的类型(在该例中,它只是一个简单的字符串)。
Here I've used the new keyword enum, given the enum a name, and specified the allowed values. Grade then becomes an enumerated type, which you can use in a manner shown in Listing 3.
在这里,我使用了新的关键字enum,为enum提供了一个名称,并指定了允许的值。
Here I've used the new keyword enum, given the enum a name, and specified the allowed values. Grade then becomes an enumerated type, which you can use in a manner shown in Listing 3.
在这里,我使用了新的关键字enum,为enum提供了一个名称,并指定了允许的值。
应用推荐