Tagged articles
Immutable Collections
11 articles · Page 1 of 1
The article demonstrates that although List.of, Arrays.asList, and unmodifiableList implement the List interface, they violate the Liskov Substitution Principle because their optional add/remove operations throw UnsupportedOperationException, revealing a hidden contract mismatch between interface documentation and runtime behavior.
Design PrinciplesImmutable CollectionsJava
0 likes · 13 min read


java1234Aug 11, 2026 · Backend Development
Guava, Google’s core Java library, offers a rich set of utilities—immutable collections, null‑safe string handling, local caches, and concurrency helpers—that reduce boilerplate, prevent bugs, and integrate with a single Maven/Gradle dependency, making it a popular choice for modern Java backend development.
CacheGoogle Core LibrariesGradle
0 likes · 9 min read

The article examines the recent push for modern features in Java, contrasts them with Scala implementations that have existed for years, and walks through functional programming, pattern matching, immutable collections, type inference, string interpolation, sealed classes, and concurrency with side‑by‑side code examples in both languages.
ConcurrencyImmutable CollectionsScala
0 likes · 17 min read

This article dissects the Guava library to reveal how seven classic design patterns—Builder, Proxy, Immutable, Singleton, Decorator, Adapter, and Observer—are implemented in its core classes, providing clear code examples, step‑by‑step construction processes, and practical insights for Java developers.
Builder PatternGuavaImmutable Collections
0 likes · 27 min read

This article demonstrates how to create immutable collections in Java, comparing traditional approaches using Collections.unmodifiableSet/List with Java 8 Stream‑based methods and the concise Java 9 factory methods Set.of, List.of, and Map.of, and explains key differences between List.of and Arrays.asList.
Immutable CollectionsJavaList.of
0 likes · 5 min read

This article introduces Google Guava, covering its core purpose, how to add the library via Maven, the benefits and creation methods of immutable collections, the additional collection types such as Multiset, Multimap, BiMap, Table, and ClassToInstanceMap, as well as Guava's helper utilities for JDK collections, primitive types, strings, and the Stopwatch timing class, each illustrated with code examples and links to source repositories.
Google GuavaImmutable CollectionsMultimap
0 likes · 15 min read

This article reviews the key Java 10 features—including the shortened six‑month release cycle, local‑variable type inference with the new var keyword, strengthened immutable collection APIs, the Optional.orElseThrow() method, and other performance and container‑integration improvements—while highlighting best‑practice pitfalls.
Immutable CollectionsJavaJava 10
0 likes · 7 min read

This article introduces Vavr, a Java 8 functional library that brings immutable data structures, observable side‑effects via Try, rich tuple and function APIs, lazy evaluation, and pattern matching, helping Java developers adopt functional programming concepts efficiently.
Immutable CollectionsJavaVavr
0 likes · 9 min read

This article introduces Vavr, a Java 8 functional library that brings immutable, persistent collections, observable side‑effects via Try, tuple types, enhanced function composition, lazy evaluation, and Scala‑like pattern matching, showing code examples and explaining how to integrate the library into Maven projects.
Immutable CollectionsJavaVavr
0 likes · 9 min read


21CTOMay 23, 2021 · Backend Development
This article introduces Java 9‑16 features such as factory methods for immutable collections, Optional.ifPresentOrElse, new Stream operations like takeWhile/dropWhile and toList, plus enhanced Duration and LocalDate utilities, providing concise, modern code patterns for developers.
DurationImmutable CollectionsJava
0 likes · 5 min read

This article explains why immutable collections improve safety and performance, how to create them with Guava's copyOf, of, and Builder methods, and introduces Guava's extended collection types such as Multiset, Multimap, BiMap, Table, ClassToInstanceMap, RangeSet, and RangeMap with usage examples.
GuavaImmutable CollectionsJava
0 likes · 16 min read
