google guava(구아바)란?

Yuri Lee·2021년 1월 29일
0

배경

프로젝트에서 gradle dependency 중 guava 를 사용하는 것을 발견했다. google guava ! 난생 처음 보는 거라 신기했다. 😗😗

google guava !

개발 시 자주 대면하는 유효성 체크, Collection, 날짜, 문자 등등 있다. 이런 걸 좀더 편하게 사용할 수 있게 Google 에서 배포되는 라이브러리이다.

장점

  • 버그 발생률을 현저히 줄일 수 있다.
  • 장황하고 비효율적인 코드를 줄일 수 있다.
  • 직관적이다.
  • 개발표준을 준수하는 코드를 작성할 수 있다.
  • 편하다.
  • 생상성이 증가한다.

사용법

그 중에서도 CaseFormat 에 관련된 것을 살펴보려고 한다.

  • CaseFormat: 문자열을 camel style 로 변경하는 함수
System.out.println(CaseFormat.LOWER_HYPHEN.to(CaseFormat.LOWER_CAMEL, "test-data")); // testData

https://krksap.tistory.com/1187
https://javaiyagi.tistory.com/423
https://whitelife.tistory.com/182 [White Life Story]
http://herecomesthenicebreeze.blogspot.com/2016/01/java-guava-library.html
https://guava.dev/releases/19.0/api/docs/com/google/common/base/CaseFormat.html#UPPER_UNDERSCORE
https://m.blog.naver.com/PostView.nhn?blogId=young4862&logNo=221147724695&proxyReferer=https:%2F%2Fwww.google.com%2F

profile
Step by step goes a long way ✨

1개의 댓글

comment-user-thumbnail
2022년 7월 12일

안공부하신게 어떤거죠 .. 대단하세요 !

답글 달기