下面的表达式指定按层次结构向下转换为一个根据程序上下文推断出的类型。
The following expression specifies a conversion down the hierarchy to a type that is inferred from program context.
如果在某一部分中,一个抽象了的类必须向下转换为特定的子类,那么你就没有遵循开闭原则。
If a class that uses an abstraction has to downcast to a specific subclass in one section, you're not following the Open Closed Principle.
使用Person的特定方法需要对next()返回的对象进行向下转换。
Using the particular methods of Person would require a downcast on the objects returned by next().
这有何意义?为了使方法的调用符合签名,编译器如何知道应当对哪个对象进行向下转换操作呢?
Which makes sense - how is the compiler supposed to know which object it should downcast in order to make the call fit one of those signatures?
从解析器中检索到事件之后,应用程序通常需要将其向下转换成XMLEvent的子类型以便访问该特定类型的信息。
After retrieving an event from the parser, the application typically needs to downcast it into one of the XMLEvent sub-types in order to access its type-specific information.
继承一个基类而无法将它向下或向上转换到基类的理念是不明智的。
The idea of inheriting from a base class without being able to downcast to it or upcast to the base just seemed silly.
所有从一种状态到另一状态的其他转换都可以具有一些操作,在调用这些操作时,会导致向下一状态转换。
All other transitions from one state to another may have operations that, when called, cause a transition to the next state.
我跌倒并沿著斜坡向下滚去,中途我顺利得转换成蹲伏的姿势,我赶紧跳起来,继续沿著斜坡向下跑去,直到跑到最底层的那个斜坡。
I tumbled all the way down and somehow managed to roll into a crouching position, sprang to my feet and kept running till I hit the bottom ramp.
自顶向下——从现有的接口XML描述(XML模式、DTD、WSDL)开始,派生 XML数据模型,并生成映射/转换代码。
Top-down -- Start from an existing XML description of the interface (XML schema, DTD, WSDL), derive the XML data model, and generate the mapping/conversion code.
每次当你看到游泳者向上跳起,又向下跃入水中时,你就会感到,他要把很陡的斜角动能,转换成水平的初速度,将是多么困难。
Every once while you see a swimmer take it up and then in, it is really hard to transfer that momentum from a steep angle entry to a horizontal speed.
说明了它对反射纵波和转换横波同时向下延拓和偏移是稳定的,所得到的偏移结果是令人满意的。
Downward continuation of both the reflected P and converted s simultaneously is stable. The wave forms of both th...
要点就是吸收向下的动力,并尽可能迅速平稳地将这个力量转换成向上的动力。
The key is absorbing the downward motion and reversing the force into an upward motion as rapidly and smoothly as possible.
要点就是吸收向下的动力,并尽可能迅速平稳地将这个力量转换成向上的动力。
The key is absorbing the downward motion and reversing the force into an upward motion as rapidly and smoothly as possible.
应用推荐