关于Runnable接口的JDK文档翻译
2010-10-02 18:23
435 查看
The Runnable interface should be implemented by any
class whose instances are intended to be executed by a thread.
Runnable 接口应该由那些打算通过某一线程执行其实例的类来实现。其中whose 是定语从句,whose 是定语从句中一个常用的关系代词, 它是关系代词who的所有格,在从句中作定语,也就是说当先行词与从句中某个名词有所属关系,表达“……的”意思时,用关系代词whose 引导定语从句,它既可以指代人,也可以指代物,既可引导限制性定语从句,也可以引导非限制性定语从句。
The class must define a method of no arguments called run.
类必须定义一个称为
This interface is designed to provide a common protocol for objects that
wish to execute code while they are active.
设计该接口的目的是为希望在活动时执行代码的对象提供一个公共协议
这里的that是定语从句。
For example,
Runnable is implemented by class Thread.
例如,
Being active simply means that a thread has been started and has not
yet been stopped.
激活的意思是说某个线程已启动并且尚未停止。
In addition, Runnable provides the means for a class to be
active while not subclassing Thread.
另外,Runnable 为非
A class that implements
Runnable can run without subclassing Thread
by instantiating a Thread instance and passing itself in
as the target.
通过实例化某个
In most cases, the Runnable interface should
be used if you are only planning to override the run()
method and no other Thread methods.
This is important because classes should not be subclassed
unless the programmer intends on modifying or enhancing the fundamental
behavior of the class.
class whose instances are intended to be executed by a thread.
Runnable 接口应该由那些打算通过某一线程执行其实例的类来实现。其中whose 是定语从句,whose 是定语从句中一个常用的关系代词, 它是关系代词who的所有格,在从句中作定语,也就是说当先行词与从句中某个名词有所属关系,表达“……的”意思时,用关系代词whose 引导定语从句,它既可以指代人,也可以指代物,既可引导限制性定语从句,也可以引导非限制性定语从句。
(注:定语从句修饰一个名词或代词,被修饰的名词,词组或代词即先行词) |
类必须定义一个称为
run的无参数方法。 call为命名,取名的意思
This interface is designed to provide a common protocol for objects that
wish to execute code while they are active.
设计该接口的目的是为希望在活动时执行代码的对象提供一个公共协议
这里的that是定语从句。
For example,
Runnable is implemented by class Thread.
例如,
Thread类实现了
Runnable
Being active simply means that a thread has been started and has not
yet been stopped.
激活的意思是说某个线程已启动并且尚未停止。
In addition, Runnable provides the means for a class to be
active while not subclassing Thread.
另外,Runnable 为非
Thread子类的类提供了一种激活方式
A class that implements
Runnable can run without subclassing Thread
by instantiating a Thread instance and passing itself in
as the target.
通过实例化某个
Thread实例并将自身作为运行目标,就可以运行实现
Runnable的类而无需创建
Thread的子类。
In most cases, the Runnable interface should
be used if you are only planning to override the run()
method and no other Thread methods.
This is important because classes should not be subclassed
unless the programmer intends on modifying or enhancing the fundamental
behavior of the class.
相关文章推荐
- 关于几个HTML文档接口的使用探讨
- S a759 wift 3.1 官方文档翻译(一)——关于 Swift
- [原][译][osgearth]关于Features & Symbology (特征与符号)(OE绘制矢量几何与特殊字符)讲解(OE官方文档翻译)
- 用java的jdk 生成android 的jni接口文档
- 来自java文档 接口Runnable
- Android接口与架构(驱动开发)翻译官方文档
- 接口 ThreadMXBean 一个很好用的线程管理接口类 可以参考 jdk 帮助文档
- [原][译][osgearth][EarthFile]关于EarthFile 的Model Layer 讲解(通过earth文件加载模型层)(OE官方文档翻译)
- java8 JDK1.8 API 中文 翻译版 java帮助文档
- 关于ContentProvider(Android SDK 中文翻译文档)
- 关于PHP--支付宝接口开发文档
- 关于DirectX帮助文档翻译的事情
- PlatformBuilder 文档中关于“如何开发设备驱动”的翻译
- 关于MIPI CSI-2 接口标准的资料翻译
- ArcObjects帮助文档翻译--接口转换 Casting between interfaces
- BroadleafCommerce官方关于内嵌SOLR的文档翻译
- 关于Override在JDK1.5和JDK1.6上子类实现接口中方法使用@Override注解编译错误.
- 关于几个HTML文档接口的使用探讨
- 关于drawRect:方法apple官方文档的翻译
- 关于构建文档翻译平台的想法