Comments on: Java 8: A Type Safe Map Builder Using Alternating Interface Exposure https://speedment.com/java-8-a-type-safe-map-builder-using-alternating-interface-exposure/ Build Fast Java Applications for the Fastest Business Performance Fri, 01 May 2020 05:21:37 +0000 hourly 1 https://wordpress.org/?v=5.1.1 By: Per Minborg https://speedment.com/java-8-a-type-safe-map-builder-using-alternating-interface-exposure/#comment-84 Mon, 07 Aug 2017 08:25:04 +0000 https://speedment.com/java-8-a-type-safe-map-builder-using-alternating-interface-exposure/#comment-84 If you call the builder without entering any key, then you shall get an empty Map as described in the main example under the "// Create an empty map". This is the reason.

]]>
By: Anonymous https://speedment.com/java-8-a-type-safe-map-builder-using-alternating-interface-exposure/#comment-89 Fri, 19 May 2017 02:28:49 +0000 https://speedment.com/java-8-a-type-safe-map-builder-using-alternating-interface-exposure/#comment-89 Why does InitialKeyBuilder have a build() method? I commented it out and everything seems to be working fine. Is it there by mistake?

]]>
By: Anonymous https://speedment.com/java-8-a-type-safe-map-builder-using-alternating-interface-exposure/#comment-90 Fri, 19 May 2017 01:57:46 +0000 https://speedment.com/java-8-a-type-safe-map-builder-using-alternating-interface-exposure/#comment-90 OK, I figured out how to use the overloaded toMap that takes a Supplier argument. Thank you!

]]>
By: Anonymous https://speedment.com/java-8-a-type-safe-map-builder-using-alternating-interface-exposure/#comment-91 Fri, 19 May 2017 01:34:21 +0000 https://speedment.com/java-8-a-type-safe-map-builder-using-alternating-interface-exposure/#comment-91 This is really cool, but I'm still trying to wrap my mind around it.

I am trying to make an option to return a TreeMap with a String.CASE_INSENSITIVE_ORDER Comparator, and I looked at your other post about the Map.builder() but it's not working for me so far.

Any thoughts?

]]>
By: Per Minborg https://speedment.com/java-8-a-type-safe-map-builder-using-alternating-interface-exposure/#comment-101 Tue, 15 Nov 2016 18:47:08 +0000 https://speedment.com/java-8-a-type-safe-map-builder-using-alternating-interface-exposure/#comment-101 the toMap method is in Collectors::toMap. The imports was not included. Sorry for that.

]]>
By: R-Guitar https://speedment.com/java-8-a-type-safe-map-builder-using-alternating-interface-exposure/#comment-104 Thu, 03 Nov 2016 22:43:21 +0000 https://speedment.com/java-8-a-type-safe-map-builder-using-alternating-interface-exposure/#comment-104 Where is "toMap(Entry::getKey, Entry::getValue)" defined in your example

]]>