[Technical translation] Guava-libraries (1): User Guide

Source: Internet
Author: User

Guava

However, you can search for javadoc over the Internet.

This

  • Basic utilities (Basic tool set): Used

Using and avoiding null (avoid null): null

Preconditions (:

Common object methods (Common object method): simplifies the implementation of object methods, such as hashCode () and toString. (Note: In Native java, an object acts as a Map)

Ordering: (SORT): Guava

Throwables: (throws an exception): simplifies the check exceptions and errors.

  • Collections: Guava

Immutable collections: it is used for defensive programming, constant set, and efficiency improvement.

New collection types: to use JDKmultisets, multimaps, tables, bidirectional maps, there are more.

Powerful collection utilities: for native java Collections

Extension utilities: Write a collection package? Implement

  • Caches: better use of local cache and support a wide range of survival time.
  • Functional idioms: Conservative use, Guava
  • Concurrency: A Powerful and simple abstract class makes it easier to write correct concurrent code.

 

ListenableFuture: There is a callback Futures when the call is completed.

Service: these tools help you start and shut down, and handle difficult status logic.

  • Strings: some very useful string tools: splitting, joining, padding, and more.
  • Primitives: allows you to operate on basic data types, such as int
  • Ranges: Guava
  • I/O: Simplified I/O streams and files in I/oJava 5 and 6.
  • Hashing: provides more sophisticated tools than Object. hashCode.
  • EventBus: Provides the Publish-subscribe-style communication mode between components, without explicitly registering components in another component.
  • Math: JDK
  • Reflection: java
  • Tips: Use Guava

Philosophy: Guava

Using Guava in your build

Using ProGuard: Avoid

Apache Commons equivalents: Use Apache Commons Collections to help you change the code.

Compatibility ,(

Idea Graveyard, requests for a feature are not accidentally rejected.

Friends is an open-source project that we like and admire.

Note: To discuss this wiki

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.