Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

[2012 자바카페 OPEN 세미나] Introduction to google guava

10,933 views

Published on

2012년 자바카페 OPEN 세미나에서 발표한 내용입니다. Google Guava에 대한 소개입니다.

Published in: Technology
  • Follow the link, new dating source: ❤❤❤ http://bit.ly/2F4cEJi ❤❤❤
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • Dating direct: ♥♥♥ http://bit.ly/2F4cEJi ♥♥♥
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • accessibility Books Library allowing access to top content, including thousands of title from favorite author, plus the ability to read or download a huge selection of books for your pc or smartphone within minutes ,Download or read Ebooks here ... ......................................................................................................................... Download FULL PDF EBOOK here { http://bit.ly/2m6jJ5M }
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • If you want to download or read this book, copy link or url below in the New tab ......................................................................................................................... DOWNLOAD FULL PDF EBOOK here { http://bit.ly/2m6jJ5M } ......................................................................................................................... Download EPUB Ebook here { http://bit.ly/2m6jJ5M } .........................................................................................................................
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • DOWNLOAD THI5 BOOKS INTO AVAILABLE FORMAT (Unlimited) ......................................................................................................................... ......................................................................................................................... Download Full PDF EBOOK here { http://bit.ly/2m6jJ5M } ......................................................................................................................... Download Full EPUB Ebook here { http://bit.ly/2m6jJ5M } ......................................................................................................................... ACCESS WEBSITE for All Ebooks ......................................................................................................................... Download Full PDF EBOOK here { http://bit.ly/2m6jJ5M } ......................................................................................................................... Download EPUB Ebook here { http://bit.ly/2m6jJ5M } ......................................................................................................................... Download doc Ebook here { http://bit.ly/2m6jJ5M } ......................................................................................................................... ......................................................................................................................... ......................................................................................................................... .............. Browse by Genre Available eBooks ......................................................................................................................... Art, Biography, Business, Chick Lit, Children's, Christian, Classics, Comics, Contemporary, Cookbooks, Crime, Ebooks, Fantasy, Fiction, Graphic Novels, Historical Fiction, History, Horror, Humor And Comedy, Manga, Memoir, Music, Mystery, Non Fiction, Paranormal, Philosophy, Poetry, Psychology, Religion, Romance, Science, Science Fiction, Self Help, Suspense, Spirituality, Sports, Thriller, Travel, Young Adult,
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here

[2012 자바카페 OPEN 세미나] Introduction to google guava

  1. 1. 2012년 자바카페 OPEN세미나주제 : Introduction to Google Guava 2012. 6. 16 김흥래 hrkim3468@gmail.com Java Developer’s Forum JavaCafe community
  2. 2. 구아바 ???? Java Developer’s Forum JavaCafe Community
  3. 3. 소개Google Core Library (JavaSE 5.0 +)구글 자바 프로젝트에서 기본적으로 사용Google Guava로 명칭을 통일Andorid 개발 지원GWT 개발 지원Apache license 2.0
  4. 4. 지겹다. 또 라이브러리야??? 식상해…………….
  5. 5. Apache Commons Lang 컴포넌트 Apache Commons GoogleCollections 컴포넌트 Guava 유용한 유틸리티
  6. 6. 수많은 프로젝트에비슷한 기능은 없을까?
  7. 7. 비슷한 기능을재사용 할 수는 없을까?
  8. 8. Apache Commons Library프로그램의 공통적인 기능을 재사용하기위한 목적으로 시작Google Library와 더불어 전세계적으로 가장 많이 사용되고 있는 Library현재 Commons Library는 40여개의 컴포넌트들로 구성각각의 컴포넌트를 필요에 따라서 선택적으로 사용하는 것이 가능
  9. 9. 대표적인 코드 저장소인 Google Code(http://code.google.com/)와소스포지(http://sourceforge.net/)에 공개된 약 160,000개의 오픈소스 프로젝트 중Commons 라이브러리가 사용된 프로젝트를 분석하여 시각적으로 표현한 것
  10. 10. JavaSE Standard lang을 위한 유틸리티
  11. 11. java.lang.*
  12. 12. java.lang.* PackagesBasic Class Object, Process, Runtime, System, Thread, Class, ClassLoaderWrapping Class Boolean, Byte, Character, Double, Float, Integer, LongString Class String, StringBuffer, StringBuilder
  13. 13. 특징Base Function ObjectUtils, ClassUtils, ArrayUtils, BooleanUtils문자열 조작 StringUtils, StringEscapeUtils, RandomStringUtils, Tokenizer, WordUtilsCharacter 핸들링 CharSetUtils, CharSet, CharRange, CharUtilsJVM Interaction SystemUtils, CharEncodingSerialization SerializationUtils, SerializationException
  14. 14. JavaSE Standard Collection을 위한 유틸리티
  15. 15. java.util.*
  16. 16. java.util.* PackagesCollections Class ArrayList, Array, HashMap, HashSet, LinkedList, Vector, StackUtility Class Timer, Random, Properties, Locale, Date, Calendar
  17. 17. 특징Collection 유틸리티Ordered MapsBidirectional MapsQueuesBuffersBags
  18. 18. Apache Commons 짱 좋아요!그냥 이거 쓰면 안되나요?
  19. 19. Lang 컴포넌트 Collection 컴포넌트JavaSE 5 (-) 지원 JavaSE 5 (-) 지원JavaSE 5 (+) 지원 JavaSE 5 (+) 미지원각각 다른 패키지로 제공됨 현재 개발 중단됨
  20. 20. Java 5 특징Generics 개념 도입Enum 타입 추가언어차원의 Annotation 지원파라미터 가변인자 (Varargs : VariableArgument List)
  21. 21. 2004 ??????출처 http://en.wikipedia.org/wiki/Java_version_history
  22. 22. Release Note Last Published 2011년 11월 09일 (Version:3.1) javaSE 5.0 기준으로 재개발하여 배포 Commons Lang 2.x JDK 1.2 ~ JDK 1.4 까지 지원 org.apache.commons.lang.* Commons Lang 3.x JDK 1.5 이상 지원 org.apache.commons.lang3.* 개발시 사용하는 JDK 기준으로 선택적으로 사용 필요에 의하여 혼용하여 사용 가능 (권장하지 않음)
  23. 23. Release Note Last Published 2008년 4월 15일 (Version:3.2.1) 현재 Commons Collections 개발중단 Commons Collections 라이브러리 JDK 1.2 ~ JDK 1.4 까지 지원 org.apache.commons.collection.* 개발시 사용하는 JDK 버전이 1.5 이상일 경우 사용을 권장하지 않음
  24. 24. 소개Google Core Library (JavaSE 5.0 +)구글 자바 프로젝트에서 기본적으로 사용Google Guava로 명칭을 통일Andorid 개발 지원GWT 개발 지원Apache license 2.0
  25. 25. Apache Commons Lang 컴포넌트 Apache Commons GoogleCollections 컴포넌트 Guava 유용한 유틸리티
  26. 26. Release Note Last Published 2012년 4월 30일 (Version:Release12) Apache Commons Collections 라이브러리가 Generic를 지원하지 않아 대체하려 개발 시작 2009년 JDK 1.5를 기반으로 프로젝트 시작 Release11까지는 JDK 1.5 기반 Release12부터 JDK 1.6 기반 버전업을 하면서 이름 변경 Google Collections Library => Google Guava
  27. 27. 제공되는 기능• Collections • Strings• Concurrency • Math• Primitives • In-memory caching• Reflection • Publish/Subscribe• Comparison • Various basic data• I/O• Hashing• networking
  28. 28. 제공되는 기능• Collections • Strings• Concurrency • Math• Primitives • In-memory caching• Reflection • Publish/Subscribe “JDK-plus”!!!• Comparison • Various basic data• I/O• Hashing• networking
  29. 29. Basic 유틸리티 (1/4)Object 클래스 유틸리티 java.lang.Object 클래스 Wrapping 유틸리티 com.google.common.base.Objects equals() : equals 메소드 Override 지원 hashCode() : hashCode 메소드 Override 지원 toString() : toString 메소드 Override 지원
  30. 30. Basic 유틸리티 (2/4)Null 체크 유틸리티 문자열의 null 문제를 다양하게 체크 com.google.common.base.Strings emptyToNull(String) : 파라미터로 넘어온 값이 Empty 일 경우 Null 반환 isNullOrEmpty(String) : 파라미터로 넘어온 값이 Null이나 Empty인지 검사 nullToEmpty(String) : 파라미터로 넘어온 값 이 Null 일 경우 Empty 반환
  31. 31. Basic 유틸리티 (3/4)Precondition 유틸리티 파라미터로 전달되는 값의 유효성 검사 com.google.common.base.Preconditions checkArgument(boolean) : 인자 값을 미리 테스트하여 정상인지 검사 checkNotNull(T) : 인자 값을 미리 테스트하 여 Null인지 검사 checkState(boolean) : 인자값을 미리 테스트 하여 상태값을 검사
  32. 32. Basic 유틸리티 (4/4)Ordering 유틸리티 객체 정렬을 위한 다양한 기능 제공 com.google.common.collect.Ordering reverse() : 값을 반대로 정렬 nullsFirst() : null이 존재할 경우 처음으로 정렬 nullsLast() : null이 존재할 경우 마지막으로 정렬
  33. 33. Strings 유틸리티 (1/2)Joiner 유틸리티 다양한 형태의 iterator를 하나로 합친다. com.google.common.base.Joiner join(Object[] parts) : 파라미터로 넘어온 배 열을 하나의 문자열로 합친다. on(String separator) : 합칠 문자열 사이의 Separator를 지정 skipNulls() : 합칠 문자열 중 Null 값 제거
  34. 34. Strings 유틸리티 (2/2)Splitter 유틸리티 문자열을 다양한 방식으로 분리한다. com.google.common.base.Splitter split(CharSequence sequnce) : 파라미터로 넘어온 문자열을 분리한다. on(String separator) : 분리할 기분 Separator를 지정 omitEmptyStrings() : 분리 된 결과물에서 Empty 제거
  35. 35. Collection 유틸리티
  36. 36. Immutable Collections
  37. 37. 새롭게 추가된 CollectionMultiset com.google.common.collect.Multiset 두 개 이상의 키를 핸들링 할 수 있는 Set 형태의 Collection HashMultiset, TreeMultiset, LinkedHashMultiset, ImmutableMultisetMultimap com.google.common.collect.Multimap 두 개 이상의 키를 핸들링 할 수 있는 Map 형태의 Collection HashMultimap, TreeMultimap, LinkedHashMultimap, ImmutableListMultimapBiMap com.google.common.collect.BiMap 일반적인 Map과 달리 key와 value 양방향으로 검색이 가능한 Collection HashBiMap, ImmutableBiMap, EnumBiMap, EnumHashBiMap
  38. 38. Guava 라이브러리를 써야하는 이유Apache Commons Collection의 경우 개발된지 10여년이 되었다.Apache Commons Collection의 경우JavaSE 5의 혜택이 없다. (generics, varags,enums, autoboxing)Google Guava의 경우 좀더 현대적이다.(Generic 지원, JDK7 지원)아파치 라이센스 2.0Java Collection Framework와 완벽한 호환

×