Why bother putting bounds on type parameters?
为什么要自找麻烦在类型参数上设定范围呢?
Listing 1. Multiple dispatch on type with multimethods.py.
清单1. multimethods .py中对类型进行多分派。
On type, the fractures appear normal fault, strike-slip fault and so on.
类型上,断裂主要有正断层、逆断层和雁行断层等形式。
Responses varied depending on type of illness, cost and accuracy of the prediction.
受访者的答案随疾病种类,费用和预测准确性而改变。
Objective To study the prophylactic effects of t cell vaccination on type 1 diabetes.
目的探讨T细胞接种对1型糖尿病预防作用的机制。
You could fall back on type checking inside the add method, but that is not elegant and inflexible.
您可以依赖add方法内部的类型检查,但这并不优雅而且不固定。
Include additional annotations on type parameters telling us which constructors those instantiations must contain.
包含额外的类型参数注释,告知我们这些实例化必须包含哪些构造函数。
Because the SOAP encoding is heavy on type information, you must decorate each parameter with a type (see Listing 2).
因为SOAP编码很注重类型信息,所以您必须用一个类型修饰每个参数(请参阅清单2)。
This function is completely reusable by any chain of visitors that needs to optionally evaluate the rest of the chain based on type.
此函数完全可供可能需要按照类型对链接的其他部分求值的任何访问者链接重用。
These simple examples don’t even begin to scratch the surface of Scala’s pattern matching features. Let’s try matching based on type
这些例子甚至还没有开始接触到Scala 的模式匹配特性的最表面。
Prototyping is a more hands-on type of modeling that can involve a mock-up, test-of-principle, or actual working version of a specific area of the design.
原型是一种非常有帮助的建模类型,它可以用于模拟,原理测试,或者设计的特定方面的实际工作。
Because Tiger relies on type erasure, the naked type parameters in casts and instanceof tests are "erased" to their upper bounds (in the earlier case, that'll be type Object).
因为Tiger依靠类型擦除,所以数据类型转换和instance of测试中的外露类型参数被“擦除”为它们的上界(在前面的例子中,那将是类型Object)。
That is, a visitor will have a .visit_FOO() and .depart_FOO() method for each type of node, rather than switching on type within large .startElement() and endElement() methods.
即,访问器会有针对每种类型节点的 .visit_FOO()和 .depart_FOO()方法,而不是在大型的.startElement() 和endElement() 方法中按类型进行切换。
The NotificationFilterSupport class allows you to filter notifications based on type; in this case, only websphere.ras.fatal and websphere.ras.error notifications are accepted.
notificationfiltersupport类允许您根据类型过滤通知;在本例中,只接受websphere . ras . fatal和websphere . ras . error通知。
The ability to validate XML, or ensure that it satisfies some restriction based on type, is inherent in the language itself; Document Type Definitions are part of the XML specification.
验证XML或确保满足基于类型的某些限制是语言自身所固有的能力;DocumentTypeDefinitions是 XML规范的一部分。
Most of the universal vaccines under development do not even try to provide protection against influenza type B. They focus on type A, which tends to cause more severe disease and pandemics.
大多数正在研制的通用流感疫苗,甚至没有提供B型流感病毒的预防。 科学家们把重点集中在了A型流感上,因为它往往会造成更严重的疾病和流行病。
Professor Bonnet has been working for many years on molecules of this type.
博内特教授多年来一直在研究这类分子。
The treatment regime may vary widely depending on the type of injury.
治疗方法可能会因受伤类型的不同而有很大差别。
More and more, young people choose spending time on their electronic devices over engaging in other activities, regardless of the type.
越来越多的年轻人选择把时间花在电子设备上,而不是参加其他活动,不论是什么类型的活动。
Nevertheless, the group took largely the same approach it did in 1999, uniformly discouraging passive media use, on any type of screen, for these kids.
然而,该组织采取了与1999年相似的方法,即,一致反对儿童接触被动媒体或接触任何类型的屏幕。
Researchers claim that a new quiz is able to work out your personality type on the basis of how you react to a series of colour combinations.
研究人员声称,有一项新的测验能够根据你对一系列颜色组合的反应来确定你的个性类型。
As in other decisions when shopping for a sailboat, the best type of motor depends mostly on your preferred uses of the boat.
就像购买帆船时的其他决定一样,最佳的发动机类型也主要取决于你对船只的偏爱。
King penguins are the second-largest type of penguin and only breed on specific isolated islands in the Southern Ocean where there is no ice cover and easy access to the sea.
帝企鹅是企鹅的第二大种类,它们只在南大洋的特定孤岛上繁殖,那里没有冰层覆盖,很容易进入大海。
Factual writing provides background information on an author, composer or artist, or on a type of music, literature or art.
纪实写作提供了各种背景信息,包括某位作者、作曲家或艺术家,或者是有关某类型的音乐、文学或艺术。
So while on Earth we have several types of volcanoes, on Venus there's mostly the one type.
所以地球上的火山有好几种类型,而在金星上的火山只有一种。
The type of aid coming in makes no immediate impression on the horrific death rates.
这种即将到来的救助不会对恐怖的死亡率造成立杆见影的强烈影响。
Even on first acquaintance it was clear that he was not 'the right type'.
初次见面就看出他显然不是“对路子的人”。
Clayton's experiment required jays to remember the type, location, and freshness of stored food based on a unique learning event.
克莱顿的实验要求松鸦根据一个独特的学习事件来记住所储存食物的类型、位置和新鲜程度。
Vocational type classes, such as computer science or journalism, on the other hand, are often more research oriented and lend themselves to take home testing.
另一方面,像计算机科学或新闻学这样的职业类课程通常更偏重于研究,也便于他们在家进行测试。
Ocean colour varies from green to blue, depending on the type and concentration of phytoplankton.
根据浮游植物的种类和浓度,海洋颜色有从绿色到蓝色不等。
应用推荐