In cases where the string cannot be converted to an integer, a user-specified default int is placed in the target field.
对于不能将字符串转换为整数的情况,将在目标字段中使用一个用户指定的默认整数。
For example, consider a person's age, one business object might express age as a string and another as an int.
例如,考虑某个人的年龄,一个业务对象可能会将年龄表示为一个字符串,而另一个业务对象则会表示为一个整数值。
The example in Listing 1 illustrates variable creation of a variety of types (int, float, string, array, and function).
清单1中的示例说明了如何创建多种类型的变量(整型、浮点、字符串、数组和函数)。
Assign is only available for assigning a value to simple type fields, such as string and int. To create an assign mapping.
Assign只能用于为简单类型字段指定值,比如字符串和整数。
Also suppose that the Collaborator object requires a string and a primitive int as parameters passed to the constructor.
同时假定Collaborator对象要求使用字符串和原始的int作为传递给构造函数的参数。
send_message; this means that the parameters are an int, a char* (s for string), and an int; and that if an exception is thrown, the function is called TrayIcon.send_message.
这意味着参数依次是int 、char* (s 表示字符串)和 int ;而且如果抛出一个异常,则该函数称作 TrayIcon.send_message 。
Import XSD primitive data types to the model (these primitive data types can be used to use primitive types, such as string, int, and float in the schema).
向模型导入XSDprimitiveDataTypes(您可以使用原始数据类型来利用原始类型,例如模式之中的字符串,整数以及浮动数)。
One of them takes no arguments, another one takes an Int ID value, and another one takes both an Int and String.
其中一个没有参数,另外一个接受整型id值,还有一个同时接收整型和字符串参数。
In this case, you can use a Convert to ensure that the string age, which is expected, but not required to be an int, is actually an int in the target.
对于这种情况,您可以使用Convert来确保字符串格式的年龄(预期的值,但不一定要为整数值)在目标中为一个整数值。
For example, if you have a box designed to hold values of type int, you cannot put values of type string into that box.
例如,如果你有一个设计用来放入类型是int的值的盒子,你就不能把类型是string的值放入那个盒子。
To specify an int variable for an iterator and a String variable for element name, use the code in Listing 17.
要为迭代器指定一个int变量并为元素名称指定一个String变量,请使用清单17中的代码。
Similar considerations apply if we change the type of the first parameter from String to int.
如果将第一个参数的类型从String变成 int ,那么也得考虑相同的问题。
Both blocks of code evaluate an int value using a switch statement that results in a human-readable string value printed to the console.
这两个代码块都会使用switch语句计算int值,从而得到输出到控制台的供人阅读的字符串值。
Click the default string type and select int from the types list.
单击缺省的string类型,并从类型列表中选择int。
For example, if I have a method called draw (String STR), an overloaded version can have the following form: draw (String STR, int I).
例如,如果有一个名为draw (Stringstr)的方法,那么重载的方法可以有以下形式:draw (String str,inti)。
We now know that this represents a function pointer type that can refer to any method taking a single int argument and returning a string.
我们现在知道了这是一个函数指针类型,它可以引用任何有一个int类型参数并且返回一个string类型的方法。
Several overloaded versions of these accessors are provided, allowing the properties to be accessed by passing the property name (String), number (int), or property meta object itself.
这些访问器方法有不同的重载版本,可以通过传递属性名(String)、编号(int)或者属性元对象本身来访问属性。
For example, an int parameter would be declared as int and a String parameter would be declared as String so a value could be returned in it.
例如,int参数将被声明为int,而String参数则被声明为String,因而可以在这些参数中返回一个值。
It's much more difficult, say, to start with an XSD: int filler field and decide later that it should have been a string.
如果这样做就很困难:以xsd:int填充字段开始,以后才决定他应该是字符串。
The field types supported are: primitives (int, string, etc), Date, Timestamp, as well as objects composed of primitives, hashmaps, and collections (non-generic) of objects.
支持的字段类型:原生类型(int、string等)、Date、Timestamp、以及原生类型的组合类型、hashmap、对象集合(非范型)。
The getInstance() method first tests to determine if the type under consideration is supported by reflecting an appropriate method: getInt() for an int, getString() for a String, and so on.
getInstance()方法首先通过反射一个适当的方法以测试判断当前考虑的类型是否受支持:getInt() 对应于int,getString() 对应于String,等等。
Use the int variable iter to indicate the different "article" elements in the XML document, and the String variable elemtext to specify the element tag name.
使用int变量iter来表示XML文档中不同的“article ”元素,同时使用String变量elemtext来制定元素标签名称。
If the part element has a type attribute, then you can tell directly whether the type is simple (for example, XSD: int, XSD: string, etc.) or complex.
如果这个部分元素具有一个类型属性,那么您就可以直接看出这个类型是简单的(例如,xsd:int、xsd:string,等等)还是复杂的。
Add a String field called name and an int field called id.
添加名为name的String字段和名为id的int字段。
Axis handles only basic primitive objects, such as String, int, float, and so on.
Axis只处理基本的原始对象,如String、int、float等。
The setProp.tag file can be used to set properties that have a type accepted by <c:set>, such as String, int, float, boolean as well as indexed properties, which can be String arrays.
tag文件用于设置拥有 <c:set>接受的类型(比如String、int、float 和boolean)的属性和索引属性,后者可能是 String数组。
Interval averaged: the trace (long value, String name) and trace (int value, String name) methods issue traces for interval averaged values (see the Intervals sidebar).
平均时间间隔:trace (longvalue,Stringname)和trace (int value, String name)方法将发出时间间隔平均值的跟踪(请参阅时间间隔侧栏)。
Suppose two methods are identical except that one takes a parameter of type List [String] while the other takes a parameter of type List [Int], as in the the following example.
假设两个方法其它方面都一样,只是其中一个接受List [string]参数,而另外一个接受List [int]参数,如下所示。
A new update method called updateStatus int userId, String status makes use of the saved access token see Listing 3. In the main method, comment out the line tt.updateStatus " studying."
名为updatestatus (intuserId,Stringstatus)的新更新方法使用了存储的访问令牌(参见清单3)。
So far, nothing new here; you map the authors property, and the type is a class this time, instead of string or int.
这很好理解,映射authors属性,但其类型是类而不再是string或int。
应用推荐