Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 9ba57f5

Browse files
blakehawkinsshekhargulati
authored andcommitted
reflow paragraphs in section 6 (#12)
1 parent 748588e commit 9ba57f5

File tree

1 file changed

+11
-5
lines changed

1 file changed

+11
-5
lines changed

‎06-map.md‎

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,16 @@
11
Map Improvements
22
---------
33

4-
Map is one the most important data structure. In Java 8, a lot of goodies has been added to the Map API that will make it easy to work with them. We will look at all the enhancements made to them one by one. Every feature is shown along with its JUnit test case.
4+
Map is one the most important data structure. In Java 8, a lot of goodies has
5+
been added to the Map API that will make it easy to work with them. We will look
6+
at all the enhancements made to them one by one. Every feature is shown along
7+
with its JUnit test case.
58

69
## Create Map from List
710

8-
Most of the times we want to create a map from existing data. Let's suppose we have a list of tasks, every task has an id and other associated data like title, description, etc.
11+
Most of the times we want to create a map from existing data. Let's suppose we
12+
have a list of tasks, every task has an id and other associated data like title,
13+
description, etc.
914

1015
```java
1116
import static java.util.function.Function.identity;
@@ -26,8 +31,8 @@ public void shouldCreateMapFromTaskList() throws Exception {
2631

2732
## Using a different Map implementation
2833

29-
30-
The default implementation used by `Collectors.toMap` is `HashMap`. You can also specify your own Map implementation by providing a supplier.
34+
The default implementation used by `Collectors.toMap` is `HashMap`. You can also
35+
specify your own Map implementation by providing a supplier.
3136

3237
```java
3338
@Test
@@ -46,7 +51,8 @@ public void shouldCreateLinkedMapFromTaskList() throws Exception {
4651

4752
## Handling duplicates
4853

49-
One thing that we glossed over in the last example was what should happen if there are duplicates. To handle duplicates there is a argument
54+
One thing that we glossed over in the last example was what should happen if
55+
there are duplicates. To handle duplicates there is a argument
5056

5157
```java
5258
@Test

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /