Deine IDE kann sowohl eine hashCode() als auch eine equals() Methode generieren. Aber viele IDE generieren diese falsch! Daher zeige ich dir in diesem Video, was du insbesondere bei der equals() Methode beachten solltest und wie du mit der @HashCodeAndEquals Annotation von Lombok jede Menge Boilderplate Code vermeidest.
Alle Beispiele findest du auch auf meinem GitHub Account, den ich dir weiter unten verlinkt habe.
Unterstütze mich und werde jetzt Mitglied bei Patreon.
/ dev_time_clap
Als Danke schön wird dein Nickname im Abspann angezeigt.
________________________________________
Project Lombok
________________________________________
⮜ Inhalt ⮞
00:00 Einleitung
00:29 Intro
00:42 Was macht die hashCode() Methode?
04:13 hashCode() mitttels Lombok generieren
05:36 Was macht die equals() Methode?
07:13 Die 4 Eigenschaften von equals()
09:55 Was macht die cacheStrategie Einstellung?
10:58 Was macht die callSuper Einstellung?
12:55 Was macht die doNotUseGetters Einstellung?
13:54 Was machen @Exclude, @Include und onlyExplicitlyIncluded?
15:12 Warum ist die Methode canEqual() so wichtig?
21:21 Abspann
________________________________________
⮜ Links ⮞
● https://projectlombok.org/features/Eq...
● https://github.com/dev-time-clap/lomb...
________________________________________
⮜ Credits ⮞
Intro & Outro:
● MAYDAY by thefatrat
https://www.thefatrat.com/release/mayday
Grafiken:
● Pfeil by Clker-Free-Vector-Images
https://pixabay.com/vectors/arrow-rot...
________________________________________
⮜ Trademark-Hinweis ⮞
Project Lombok™ and the Project Lombok logo are trademarks or identifying marks of Project Lombok.
Eclipse Adoptium™ and Eclipse Temurin™ are trademarks of the Eclipse Foundation AISBL.
Spring® and Spring Boot® are registered trademarks of Broadcom Inc. and/or its subsidiaries.
All other trademarks mentioned are the property of their respective owners.
This channel and its content are independent and not endorsed, sponsored, or affiliated with the respective trademark holders.
Logos and trademarks are used here only to identify technologies discussed in the video.
________________________________________
#projectlombok #lombok #boilerplatecode #springboot #java #javaprogramming #programming #development #studium #ausbildung #devtime