Skip to content

Commit c2340c1

Browse files
committed
单词翻译订正
1 parent c72104a commit c2340c1

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

docs/book/14-Streams.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ public class ImperativeRandoms {
6767
[7, 8, 9, 11, 13, 15, 18]
6868
```
6969

70-
`Randoms.java` 中,我们无需定义任何变量,但在这里我们定义了 3 个变量: `rand``rints``r`。由于 `nextInt()` 方法没有下标的原因(其内置的下标永远为 0),这段代码实现起来更复杂。所以我们要生成额外的值来过滤小于 5 的结果。
70+
`Randoms.java` 中,我们无需定义任何变量,但在这里我们定义了 3 个变量: `rand``rints``r`。由于 `nextInt()` 方法没有下限的原因(其内置的下限永远为 0),这段代码实现起来更复杂。所以我们要生成额外的值来过滤小于 5 的结果。
7171

7272
**注意**,你必须要研究程序的真正意图,而在 `Randoms.java` 中,代码只是告诉了你它正在做什么。这种语义清晰性也是 Java 8 的流式编程更受推崇的重要原因。
7373

@@ -189,15 +189,15 @@ public class RandomGenerators {
189189
show(rand.ints().boxed());
190190
show(rand.longs().boxed());
191191
show(rand.doubles().boxed());
192-
// 控制上标和下标
192+
// 控制上限和下限
193193
show(rand.ints(10, 20).boxed());
194194
show(rand.longs(50, 100).boxed());
195195
show(rand.doubles(20, 30).boxed());
196196
// 控制流大小:
197197
show(rand.ints(2).boxed());
198198
show(rand.longs(2).boxed());
199199
show(rand.doubles(2).boxed());
200-
// 控制流的大小和角标
200+
// 控制流的大小和界限
201201
show(rand.ints(3, 3, 9).boxed());
202202
show(rand.longs(3, 12, 22).boxed());
203203
show(rand.doubles(3, 11.5, 12.3).boxed());
@@ -833,7 +833,7 @@ public class Prime {
833833
467 479 487 491 499 503 509 521 523 541
834834
```
835835

836-
`rangeClosed() ` 包含了上界值。如果余数没有产生 0,则 `noneMatch()` 操作返回 ture,如果出现任何等于 0 的则返回 false。 `noneMatch()` 操作在第一次失败之后就会推出,而不是进行全部尝试。
836+
`rangeClosed() ` 包含了上限值。如果余数没有产生 0,则 `noneMatch()` 操作返回 ture,如果出现任何等于 0 的则返回 false。 `noneMatch()` 操作在第一次失败之后就会推出,而不是进行全部尝试。
837837

838838
### 应用操作到所有元素
839839

0 commit comments

Comments
 (0)