• mixin泛型完美组合

    Mixins and generic classes: a perfect match.

    youdao

  • 一个静态泛型工厂方法

    A static factory method on a generic or a non-generic class?

    youdao

  • 可以使用泛型接口间接访问

    You can access a generic class indirectly using a nongeneric base interface.

    youdao

  • 编辑任何泛型声明

    Editing any generic class declaration.

    youdao

  • 有时我们限制可能出现泛型实例化。

    Sometimes we want to restrict the potential type instantiations of a generic class.

    youdao

  • 这个泛型每个应用都会继承一个不同的

    Each application of this generic class would extend a distinct parent class.

    youdao

  • 程序可以产生泛型实例数目设置上限

    Place an upper limit on the number of instantiations of a generic class that a program can make.

    youdao

  • 实际参数可以泛型定义变量匹配

    The actual type arguments can be matched to the type variables defined by the generified class.

    youdao

  • 泛型视为它们的参数映射成实例化函数

    Generic classes can be viewed as functions mapping their arguments to new instantiations.

    youdao

  • 我们程序可以产生泛型实例数目设置上限

    We could put an upper limit on the number of instantiations of a generic class that a program can make.

    youdao

  • 自己的主体实例化其本身时,发生多态递归

    Polymorphic recursion occurs when a generic class instantiates itself in its own body. For example, consider the following devious example.

    youdao

  • 这个泛型处理成对参数给出了这些项目

    This generic class handles pairs of values, with the type parameters giving the types of the items in the pairs.

    youdao

  • mixin明确表述泛型时,意外覆盖问题特别讨厌

    When mixins are formulated as generic classes, the problem of accidental overrides is particularly nasty.

    youdao

  • 例如如果知道泛型用于引用则应用约束

    For example, if you know that your generic class is intended for use only with reference types, apply the class constraint.

    youdao

  • 例如List中,真的防止List构造吗?

    For example, in a generic class List, do you really want to prevent the construction of a List?

    youdao

  • 只要泛型运行时实例没有包括所需构造函数,就抛出异常

    Throw an exception whenever a run-time instantiation of the generic class does not include a needed constructor.

    youdao

  • 泛型用于集合链接列表哈希堆栈队列

    The most common use for generic classes is with collections like linked lists, hash tables, stacks, queues, trees, and so on.

    youdao

  • 原因是:mixin泛型认为是将现有映射函数

    The reason: both mixins and generic classes can be thought of as functions mapping existing classes to new classes.

    youdao

  • 所有具体工厂泛型——ControlsFactory实现

    All of the specific factories are implemented using generics - ControlsFactory class.

    youdao

  • 型类中定义的委托,可以与的方法一样使用泛型类参数

    Specialized generic types are created once for each unique value type used as a parameter.

    youdao

  • 例如JSplitPane可以创建Scrollable实例

    For example, a generic class JSplitPane may create an instance of Scrollable.

    youdao

  • 为了这个目的,使用文章中开始代表文件目录同一泛型

    For that, I'm going to use the same set of generic classes for representing file directories that I started with two articles back.

    youdao

  • 再提一次是因为可以自己的参数来实例化另一个泛型类

    Again, that's because one generic class may instantiate another with its own type parameters.

    youdao

  • 因而泛型定义内部唯一调用构造函数那些在界限声明的构造函数。

    Then, inside the generic class definition, the only constructors that could be called are those declared in the bound.

    youdao

  • 运行缺乏信息容器希望创建保护性副本泛型类提出难题

    This lack of type information at runtime poses a problem for generic container classes and for generic classes that want to make defensive copies.

    youdao

  • 同样实例化客户机必须使用满足构造函数存在所声明约束这样

    Also, client classes that instantiate our generic class must do so with classes that meet the declared constraint on what constructors exist.

    youdao

  • 定义可以客户端代码能够实例用于参数施加限制

    When you define a generic class, you can apply restrictions to the kinds of types that client code can use for type arguments when it instantiates your class.

    youdao

  • mixin明确表述泛型我们就始终柄,它是继承参数

    With mixins formulated as generic classes, we always have a handle on the parent class, the type parameter that the class extends.

    youdao

  • 通过允许指定方法操作功能安全任务转移编译器

    By allowing you to specify types that are acted on by a generic class or method, the generics feature shifts the burden of type safety from you to the compiler.

    youdao

  • 处理问题另一种方法只要泛型运行时实例化没有包括所需构造函数抛出异常

    Another way of handling this problem would be to throw an exception whenever a run-time instantiation of the generic class does not include a needed constructor.

    youdao

$firstVoiceSent
- 来自原声例句
小调查
请问您想要如何调整此模块?

感谢您的反馈,我们会尽快进行适当修改!
进来说说原因吧 确定
小调查
请问您想要如何调整此模块?

感谢您的反馈,我们会尽快进行适当修改!
进来说说原因吧 确定