Re: [翻译] Java Collection API 的怪事

楼主: PsMonkey (痞子军团团长)   2013-03-22 04:39:12
※ 引述《PsMonkey (痞子军团团长)》之铭言:
: [JavaDoc 中有一个非常奇怪的事情][quirk in JavaDoc]:
: 回传的 collection 并没有原本 collection 的 `hashCode()` 跟 `equals()`,
: 而是使用 `Object` 的 method。
这句的原文是:
The returned collection does not pass the
hashCode and equals operations through to the backing collection,
but relies on Object’s equals and hashCode methods
我对那个 pass XXX throught to OOO 完全不知道怎么翻译
只好用实际意义乱翻 [死]
: 当原本的 collection 是 set 或 list 时,
: 就需要 preserve the contract of these operation(译注:翻译不能 Orz)。
preserve the contract of operations 也卡住
理论上 preserve the contract 应该不是什么专有名词
但是用字面上翻译也很... 别扭 Orz
还请高手开示...... Orz

Links booklink

Contact Us: admin [ a t ] ucptt.com