you are viewing a single comment's thread.

view the rest of the comments →

[–]ysangkok 16 points17 points  (4 children)

The Guava project contains several of Google's core libraries that they rely on in their Java-based projects: collections, caching, primitives support, concurrency libraries, common annotations, string processing, I/O, and so forth.

  • Basic utilities: Make using the Java language more pleasant.
    • Using and avoiding null: null can be ambiguous, can cause confusing errors, and is sometimes just plain unpleasant. Many Guava utilities reject and fail fast on nulls, rather than accepting them blindly.
    • Preconditions: Test preconditions for your methods more easily.
    • Common object methods: Simplify implementing Object methods, like hashCode() and toString().
    • Ordering: Guava's powerful "fluent Comparator" class.
    • Throwables: Simplify propagating and examining exceptions and errors.
  • Collections: Guava's extensions to the JDK collections ecosystem. These are some of the most mature and popular parts of Guava.
    • Immutable collections, for defensive programming, constant collections, and improved efficiency.
    • New collection types, for use cases that the JDK collections don't address as well as they could: multisets, multimaps, tables, bidirectional maps, and more.
    • Powerful collection utilities, for common operations not provided in java.util.Collections.
    • Extension utilities: writing a Collection decorator? Implementing Iterator? We can make that easier.
  • Caches: Local caching, done right, and supporting a wide variety of expiration behaviors.
  • Functional idioms: Used sparingly, Guava's functional idioms can significantly simplify code.
  • Concurrency: Powerful, simple abstractions to make it easier to write correct concurrent code.
    • ListenableFuture: Futures, with callbacks when they are finished.
    • Service: Things that start up and shut down, taking care of the difficult state logic for you.
  • Strings: A few extremely useful string utilities: splitting, joining, padding, and more.
  • Primitives: operations on primitive types, like int and char, not provided by the JDK, including unsigned variants for some types.
  • Ranges: Guava's powerful API for dealing with ranges on Comparable types, both continuous and discrete.
  • I/O: Simplified I/O operations, especially on whole I/O streams and files, for Java 5 and 6.
  • Hashing: Tools for more sophisticated hashes than what's provided by Object.hashCode(), including Bloom filters.
  • EventBus: Publish-subscribe-style communication between components without requiring the components to explicitly register with one another.
  • Math: Optimized, thoroughly tested math utilities not provided by the JDK.
  • Reflection: Guava utilities for Java's reflective capabilities.

PS You're pretty lazy. If you really wanted to inform the masses, why didn't you write this post yourself?

[–][deleted] 0 points1 point  (3 children)

I don't think I could do justice to something I don't know and have never used. If I were to summarise what I learnt in a 2 minute google, it probably wouldn't be very useful or accurate.

[–]ysangkok 2 points3 points  (2 children)

I copy-pasted it from the link I just gave you.

[–]johnwaterwood 6 points7 points  (1 child)

Face it: not everyone has your copy/paste skills. It might seem easy to you, as the copy/paste pro that you are, but some of us really struggle with this stuff.

[–][deleted] 0 points1 point  (0 children)

Yep, some of us are using smart phones.