Skip to content

Latest commit

 

History

History
179 lines (151 loc) · 6.38 KB

utils-java.md

File metadata and controls

179 lines (151 loc) · 6.38 KB

JAVA

LEARN

EXPERIENCE

SPRING 5 REST

SPRING BOOT

FRAMEWORK

EXAMPLE

TUTORIALS

QUARKUS

QUARKUS: ARTICLES

MICROSERVICES

NEWS

LIBS: ALL

LIBS: TOOLS

LIBS: DI

LIBS: PUBSUB

LIBS: TESTS

LIBS: REACTIVE

LIBS: AUTH

BASICS

JVM

GRAALVM

CHEATSHEETS

Use nullable instead of ternary operator: LocalDate dateTime = Optional.ofNullable(offerDate).map(LocalDateTime::toLocalDate).orElseGet(LocalDate::now);

STREAM

Transform List to Map<String, List>

Map<String, List> rows = list.stream().collect( Collectors.toMap(element -> element.personalId, element -> new ArrayList(Arrays.asList(element))));