SlideShare une entreprise Scribd logo
1  sur  24
Guava
Google’s Core Libraries for java



                작성일       2011-09-25
                작성자    커뮤니티개발1팀 정희경
Contents

   Guava Overview
   Guava vs Apache Commons
   Guava Library & Examples
   Guava Pros & Cons
Guava Overview
 Google’s core Java libraries for Java 5+
 The Apache Software License, Version 2.0
 Similar to Apache Commons
 Extension of the Java Collections Framework
 Google Collection
Guava vs Apache Commons
 Generics
   Guava targets Java 5 - Greatly benefits from the
   Java 5 features: generics, enums, autoboxing ..
Guava vs Apache Commons
 Consistency with Collections framework
 Correctness – don’t need to test
 Guava has only one code dependency -
 javax.annotation
Guava Library & Examples
 The Guava Packages
Guava Library & Examples
 com.google.common.base
  common code used by other package
Guava Library & Examples
 com.google.common.base.Preconditions
  Validation checks before execution
Guava Library & Examples
 com.google.common.base.Preconditions
   Validation checks before execution
     Additional exception types




   Better handling of message arguments
     In Apache Commons

     In Guava



   Easy assignment after not null check
     In Apache Commons



     In Guava
Guava Library & Examples
 com.google.common.base.Joiner
Guava Library & Examples
 com.google.common.base.Splitter
Guava Library & Examples
 com.google.common.base.Objects
  Makes it easy to implement hashcode/ equals
Guava Library & Examples
 com.google.common.io.Files
  for working with Java I/O Collection.

                                 java.io.File




                      org.apache.commons.io.FileUtils
Guava Library & Examples
 com.google.common.io.Files
  for working with Java I/O Collection.



                        com.google.common.io.Files




                                            Result
Guava Library & Examples
 com.google.common.io.Files
Guava Library & Examples
 com.google.common.collect
  Contains generic collection interfaces and impleme
   ntations, other utilities for working with collections
  Collection Types
    BiMap
    Multiset
    Mutimap
    ListMultimap
    SetMultimap
    SortedSetMultimap
    Table
    ClassToInstanceMap
Guava Library & Examples
 com.google.common.collect
Guava Library & Examples
 com.google.common.collect.Multimaps
  allow multiple values to be stored for every key
Guava Library & Examples
 com.google.common.collect.BiMap
  one-to-one bidirectional relationship between key
   and value of the Map
Guava Library & Examples
 com.google.common.collect.Constraints
   Similar to preconditions in a way that they can restri
   ct what values are added to a collection
Guava Pros & Cons
 Guava targets Java 5 - Greatly benefits from the
  Java 5 features: generics
 Guava is very well designed / documented
   The code is useful patterns to make the API more
   readable, secure, thread-safe..
 Functional programming support
Guava Pros & Cons
 It's not a sufficient replacement for Apache
 Commons, in particular commons-codec

 If you're in an environment requiring Java 1.3 or
 1.4, you're out of luck.
Q&A
감사합니다 

Contenu connexe

Similaire à Google's Java Core Libraries Guide

Preview of Groovy 3
Preview of Groovy 3Preview of Groovy 3
Preview of Groovy 3Vijay Shukla
 
Graph ql subscriptions through the looking glass
Graph ql subscriptions through the looking glassGraph ql subscriptions through the looking glass
Graph ql subscriptions through the looking glassGerard Klijs
 
Top 10 Libraries of Java.pptx
Top 10 Libraries of Java.pptxTop 10 Libraries of Java.pptx
Top 10 Libraries of Java.pptxSudhanshiBakre1
 
How we took our server side application to the cloud and liked what we got
How we took our server side application to the cloud and liked what we gotHow we took our server side application to the cloud and liked what we got
How we took our server side application to the cloud and liked what we gotBaruch Sadogursky
 
An Introduction to Maven
An Introduction to MavenAn Introduction to Maven
An Introduction to MavenVadym Lotar
 
Graph ql subscriptions on the jvm
Graph ql subscriptions on the jvmGraph ql subscriptions on the jvm
Graph ql subscriptions on the jvmGerard Klijs
 
On HBase Integration Testing
On HBase Integration TestingOn HBase Integration Testing
On HBase Integration TestingAndrewPurtell
 
Testing Java Web Apps With Selenium
Testing Java Web Apps With SeleniumTesting Java Web Apps With Selenium
Testing Java Web Apps With SeleniumMarakana Inc.
 
Apache maven and its impact on java 9 (Java One 2017)
Apache maven and its impact on java 9 (Java One 2017)Apache maven and its impact on java 9 (Java One 2017)
Apache maven and its impact on java 9 (Java One 2017)Robert Scholte
 
Follow these reasons to know java’s importance
Follow these reasons to know java’s importanceFollow these reasons to know java’s importance
Follow these reasons to know java’s importancenishajj
 
Essential Java Libraries Every Developer Should Know About
Essential Java Libraries Every Developer Should Know AboutEssential Java Libraries Every Developer Should Know About
Essential Java Libraries Every Developer Should Know AboutInexture Solutions
 
Selenium-Browser-Based-Automated-Testing-for-Grails-Apps
Selenium-Browser-Based-Automated-Testing-for-Grails-AppsSelenium-Browser-Based-Automated-Testing-for-Grails-Apps
Selenium-Browser-Based-Automated-Testing-for-Grails-Appschrisb206 chrisb206
 
Introduction of Java 8 with emphasis on Lambda Expressions and Streams
Introduction of Java 8 with emphasis on Lambda Expressions and StreamsIntroduction of Java 8 with emphasis on Lambda Expressions and Streams
Introduction of Java 8 with emphasis on Lambda Expressions and StreamsEmiel Paasschens
 
Revolutionize DevOps with ML capabilities. Introduction to Amazon CodeGuru an...
Revolutionize DevOps with ML capabilities. Introduction to Amazon CodeGuru an...Revolutionize DevOps with ML capabilities. Introduction to Amazon CodeGuru an...
Revolutionize DevOps with ML capabilities. Introduction to Amazon CodeGuru an...Vadym Kazulkin
 
C++ vs Java: Which one is the best?
C++ vs Java: Which one is the best?C++ vs Java: Which one is the best?
C++ vs Java: Which one is the best?calltutors
 

Similaire à Google's Java Core Libraries Guide (20)

Preview of Groovy 3
Preview of Groovy 3Preview of Groovy 3
Preview of Groovy 3
 
Graph ql subscriptions through the looking glass
Graph ql subscriptions through the looking glassGraph ql subscriptions through the looking glass
Graph ql subscriptions through the looking glass
 
Java 8 Overview
Java 8 OverviewJava 8 Overview
Java 8 Overview
 
Top 10 Libraries of Java.pptx
Top 10 Libraries of Java.pptxTop 10 Libraries of Java.pptx
Top 10 Libraries of Java.pptx
 
How we took our server side application to the cloud and liked what we got
How we took our server side application to the cloud and liked what we gotHow we took our server side application to the cloud and liked what we got
How we took our server side application to the cloud and liked what we got
 
An Introduction to Maven
An Introduction to MavenAn Introduction to Maven
An Introduction to Maven
 
Graph ql subscriptions on the jvm
Graph ql subscriptions on the jvmGraph ql subscriptions on the jvm
Graph ql subscriptions on the jvm
 
On HBase Integration Testing
On HBase Integration TestingOn HBase Integration Testing
On HBase Integration Testing
 
Testing Java Web Apps With Selenium
Testing Java Web Apps With SeleniumTesting Java Web Apps With Selenium
Testing Java Web Apps With Selenium
 
perl-java
perl-javaperl-java
perl-java
 
perl-java
perl-javaperl-java
perl-java
 
Maven Introduction
Maven IntroductionMaven Introduction
Maven Introduction
 
Apache maven and its impact on java 9 (Java One 2017)
Apache maven and its impact on java 9 (Java One 2017)Apache maven and its impact on java 9 (Java One 2017)
Apache maven and its impact on java 9 (Java One 2017)
 
Follow these reasons to know java’s importance
Follow these reasons to know java’s importanceFollow these reasons to know java’s importance
Follow these reasons to know java’s importance
 
Essential Java Libraries Every Developer Should Know About
Essential Java Libraries Every Developer Should Know AboutEssential Java Libraries Every Developer Should Know About
Essential Java Libraries Every Developer Should Know About
 
Selenium-Browser-Based-Automated-Testing-for-Grails-Apps
Selenium-Browser-Based-Automated-Testing-for-Grails-AppsSelenium-Browser-Based-Automated-Testing-for-Grails-Apps
Selenium-Browser-Based-Automated-Testing-for-Grails-Apps
 
Empire: JPA for RDF & SPARQL
Empire: JPA for RDF & SPARQLEmpire: JPA for RDF & SPARQL
Empire: JPA for RDF & SPARQL
 
Introduction of Java 8 with emphasis on Lambda Expressions and Streams
Introduction of Java 8 with emphasis on Lambda Expressions and StreamsIntroduction of Java 8 with emphasis on Lambda Expressions and Streams
Introduction of Java 8 with emphasis on Lambda Expressions and Streams
 
Revolutionize DevOps with ML capabilities. Introduction to Amazon CodeGuru an...
Revolutionize DevOps with ML capabilities. Introduction to Amazon CodeGuru an...Revolutionize DevOps with ML capabilities. Introduction to Amazon CodeGuru an...
Revolutionize DevOps with ML capabilities. Introduction to Amazon CodeGuru an...
 
C++ vs Java: Which one is the best?
C++ vs Java: Which one is the best?C++ vs Java: Which one is the best?
C++ vs Java: Which one is the best?
 

Dernier

The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxLoriGlavin3
 
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...Wes McKinney
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersNicole Novielli
 
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality AssuranceInflectra
 
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesHow to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesThousandEyes
 
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better StrongerModern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better Strongerpanagenda
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
Assure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyesAssure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyesThousandEyes
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Alkin Tezuysal
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfMounikaPolabathina
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfLoriGlavin3
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxLoriGlavin3
 
Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rick Flair
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxLoriGlavin3
 
A Framework for Development in the AI Age
A Framework for Development in the AI AgeA Framework for Development in the AI Age
A Framework for Development in the AI AgeCprime
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteDianaGray10
 

Dernier (20)

The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptx
 
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software Developers
 
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
 
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesHow to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
 
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better StrongerModern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
Assure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyesAssure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyes
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdf
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdf
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
 
Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
 
A Framework for Development in the AI Age
A Framework for Development in the AI AgeA Framework for Development in the AI Age
A Framework for Development in the AI Age
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
 

Google's Java Core Libraries Guide

  • 1. Guava Google’s Core Libraries for java 작성일 2011-09-25 작성자 커뮤니티개발1팀 정희경
  • 2. Contents  Guava Overview  Guava vs Apache Commons  Guava Library & Examples  Guava Pros & Cons
  • 3. Guava Overview  Google’s core Java libraries for Java 5+  The Apache Software License, Version 2.0  Similar to Apache Commons  Extension of the Java Collections Framework  Google Collection
  • 4. Guava vs Apache Commons  Generics  Guava targets Java 5 - Greatly benefits from the Java 5 features: generics, enums, autoboxing ..
  • 5. Guava vs Apache Commons  Consistency with Collections framework  Correctness – don’t need to test  Guava has only one code dependency - javax.annotation
  • 6. Guava Library & Examples  The Guava Packages
  • 7. Guava Library & Examples  com.google.common.base  common code used by other package
  • 8. Guava Library & Examples  com.google.common.base.Preconditions  Validation checks before execution
  • 9. Guava Library & Examples  com.google.common.base.Preconditions  Validation checks before execution  Additional exception types  Better handling of message arguments  In Apache Commons  In Guava  Easy assignment after not null check  In Apache Commons  In Guava
  • 10. Guava Library & Examples  com.google.common.base.Joiner
  • 11. Guava Library & Examples  com.google.common.base.Splitter
  • 12. Guava Library & Examples  com.google.common.base.Objects  Makes it easy to implement hashcode/ equals
  • 13. Guava Library & Examples  com.google.common.io.Files  for working with Java I/O Collection. java.io.File org.apache.commons.io.FileUtils
  • 14. Guava Library & Examples  com.google.common.io.Files  for working with Java I/O Collection. com.google.common.io.Files Result
  • 15. Guava Library & Examples  com.google.common.io.Files
  • 16. Guava Library & Examples  com.google.common.collect  Contains generic collection interfaces and impleme ntations, other utilities for working with collections  Collection Types  BiMap  Multiset  Mutimap  ListMultimap  SetMultimap  SortedSetMultimap  Table  ClassToInstanceMap
  • 17. Guava Library & Examples  com.google.common.collect
  • 18. Guava Library & Examples  com.google.common.collect.Multimaps  allow multiple values to be stored for every key
  • 19. Guava Library & Examples  com.google.common.collect.BiMap  one-to-one bidirectional relationship between key and value of the Map
  • 20. Guava Library & Examples  com.google.common.collect.Constraints  Similar to preconditions in a way that they can restri ct what values are added to a collection
  • 21. Guava Pros & Cons  Guava targets Java 5 - Greatly benefits from the Java 5 features: generics  Guava is very well designed / documented  The code is useful patterns to make the API more readable, secure, thread-safe..  Functional programming support
  • 22. Guava Pros & Cons  It's not a sufficient replacement for Apache Commons, in particular commons-codec  If you're in an environment requiring Java 1.3 or 1.4, you're out of luck.
  • 23. Q&A