Tagged articles

Supplier

5 articles · Page 1 of 1
Top Architecture Tech Stack
Top Architecture Tech Stack
May 11, 2025 · Backend Development

Using Java 8 Functional Interfaces to Replace Repetitive if‑else Logic

This article explains how Java 8 functional interfaces such as Function, Supplier, Consumer, and Runnable can replace repetitive if‑else statements, provides code examples for throwing exceptions, branch handling, and present‑or‑else logic, and demonstrates practical usage to improve backend code readability.

Exception HandlingFunctional InterfaceLambda
0 likes · 6 min read
Using Java 8 Functional Interfaces to Replace Repetitive if‑else Logic
Ubiquitous Tech
Ubiquitous Tech
Apr 9, 2024 · Fundamentals

Master Java Supplier and Consumer Interfaces with Practical Examples

This article explains Java 8's Supplier and Consumer functional interfaces, illustrates their definitions, shows real‑world use cases such as random number generation, object creation, stream data sources, printing and validation, compares them with anonymous classes and lambdas, and connects them to design patterns and parameterized method calls.

Design PatternsFunctional InterfaceLambda
0 likes · 23 min read
Master Java Supplier and Consumer Interfaces with Practical Examples
Top Architect
Top Architect
Feb 22, 2021 · Backend Development

Lazy Initialization and Lazy Loading in Java: Using Supplier, Streams, and Virtual Proxy Patterns

This article explains the concepts of eager versus lazy evaluation in Java, presents common scenarios for lazy initialization, demonstrates how to implement lazy loading with Supplier, virtual proxy, and delegate patterns, and shows practical Stream examples including infinite prime number generation.

Design PatternsLazy InitializationStream
0 likes · 11 min read
Lazy Initialization and Lazy Loading in Java: Using Supplier, Streams, and Virtual Proxy Patterns
Programmer DD
Programmer DD
Feb 19, 2021 · Backend Development

Mastering Lazy Initialization and Stream Laziness in Java 8

This article explains the difference between eager and lazy evaluation, shows when and how to use lazy initialization in Java, demonstrates Supplier‑based lazy loading, virtual proxy patterns, and stream laziness with infinite streams and prime number generation, all with concrete code examples.

Functional ProgrammingLazy InitializationStream
0 likes · 12 min read
Mastering Lazy Initialization and Stream Laziness in Java 8