From b3a6b08e66f986b84f60ca9ad24195df82c02908 Mon Sep 17 00:00:00 2001 From: Blake Hawkins Date: Wed, 27 Apr 2016 12:06:16 +0100 Subject: [PATCH] reflow paragraphs in section 6 --- 06-map.md | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/06-map.md b/06-map.md index bc57c2f..fa0547d 100644 --- a/06-map.md +++ b/06-map.md @@ -1,11 +1,16 @@ Map Improvements --------- -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. +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. ## Create Map from List -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. +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. ```java import static java.util.function.Function.identity; @@ -26,8 +31,8 @@ public void shouldCreateMapFromTaskList() throws Exception { ## Using a different Map implementation - -The default implementation used by `Collectors.toMap` is `HashMap`. You can also specify your own Map implementation by providing a supplier. +The default implementation used by `Collectors.toMap` is `HashMap`. You can also +specify your own Map implementation by providing a supplier. ```java @Test @@ -46,7 +51,8 @@ public void shouldCreateLinkedMapFromTaskList() throws Exception { ## Handling duplicates -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 +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 ```java @Test