Tag

Supplier

1 views collected around this technical thread.

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.

BackendConsumerException Handling
0 likes · 6 min read
Using Java 8 Functional Interfaces to Replace Repetitive if‑else Logic
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.

Lazy InitializationStreamSupplier
0 likes · 11 min read
Lazy Initialization and Lazy Loading in Java: Using Supplier, Streams, and Virtual Proxy Patterns