google gauva learning

Disclaimer: This article is a blogger original article, shall not be reproduced without the bloggers allowed. https://blog.csdn.net/sinat_22797429/article/details/86417836

Article Directory

Foreword

Yes guava tools developed by Google based on a set of class libraries java1.6, including collections, caching, primitives support, concurrency libraries, common annotations, string processing, I / O, etc. These high quality JAVa API can make your code more elegant, more simple! guava follow an efficient java grammar practice, to make the code more scale, simple and easy to save time, resources, increasing productivity!

First list what some of the previous methods commonly used, and then learning later update!
Need to introduce guava Kit Before you begin:

    compile group: 'com.google.guava', name: 'guava', version: '26.0-jre'

set

Unchanged Collection

the immutable (immutable) object, means:

  • In the multi-threaded operation, thread-safe
  • All immutable collection ratio variable set more efficient use of resources
  • ImmutableMap support write-once multi-key, multi-valued

Guess you like

Origin blog.csdn.net/sinat_22797429/article/details/86417836