Package | Description |
---|---|
com.google.common.annotations |
Common annotation types.
|
com.google.common.base |
Basic utility libraries and interfaces.
|
com.google.common.cache |
This package contains caching utilities.
|
com.google.common.collect |
This package contains generic collection interfaces and implementations, and
other utilities for working with collections.
|
com.google.common.escape |
Interfaces, utilities, and simple implementations of escapers and encoders.
|
com.google.common.html |
Escapers
for
HTML.
|
com.google.common.io |
This package contains utility methods and classes for working with Java I/O;
for example input streams, output streams, readers, writers, and files.
|
com.google.common.math |
Arithmetic functions operating on primitive values and
BigInteger instances. |
com.google.common.net |
This package contains utility methods and classes for working with net
addresses (numeric IP and domain names).
|
com.google.common.primitives |
Static utilities for working with the eight primitive types and
void ,
and value types for treating them as unsigned. |
com.google.common.util.concurrent |
Concurrency utilities.
|
com.google.common.xml |
Escapers
for
XML.
|
Modifier and Type | Class and Description |
---|---|
interface |
Beta
Signifies that a public API (public class, method or field) is subject to
incompatible changes, or even removal, in a future release.
|
interface |
GwtCompatible
The presence of this annotation on a type indicates that the type may be
used with the
Google Web Toolkit (GWT).
|
interface |
GwtIncompatible
The presence of this annotation on a method indicates that the method may
not be used with the
Google Web Toolkit (GWT),
even though its type is annotated as
GwtCompatible and accessible in
GWT. |
interface |
VisibleForTesting
Annotates a program element that exists, or is more widely visible than
otherwise necessary, only for use in test code.
|
Modifier and Type | Class and Description |
---|---|
class |
Ascii
Static methods pertaining to ASCII characters (those in the range of values
0x00 through 0x7F ), and to strings containing such
characters. |
class |
CaseFormat
Utility class for converting between various ASCII case formats.
|
class |
CharMatcher
|
class |
Charsets
Contains constant definitions for the six standard
Charset instances, which are
guaranteed to be supported by all Java platform implementations. |
class |
Converter<A,B>
A function from
A to B with an associated reverse function from B
to A ; used for converting back and forth between different representations of the same
information. |
class |
Enums
Utility methods for working with
Enum instances. |
class |
Equivalence<T>
A strategy for determining whether two instances are considered equivalent.
|
interface |
Function<F,T>
Determines an output value based on an input value.
|
class |
Functions
Static utility methods pertaining to
Function instances. |
class |
Joiner
|
class |
Objects
Helper functions that can operate on any
Object . |
class |
Optional<T>
An immutable object that may contain a non-null reference to another object.
|
class |
Preconditions
Static convenience methods that help a method or constructor check whether it was invoked
correctly (whether its preconditions have been met).
|
interface |
Predicate<T>
Determines a true or false value for a given input.
|
class |
Predicates
Static utility methods pertaining to
Predicate instances. |
class |
Splitter
Extracts non-overlapping substrings from an input string, typically by
recognizing appearances of a separator sequence.
|
class |
Stopwatch
An object that measures elapsed time in nanoseconds.
|
class |
Strings
Static utility methods pertaining to
String or CharSequence
instances. |
interface |
Supplier<T>
A class that can supply objects of a single type.
|
class |
Suppliers
Useful suppliers.
|
class |
Ticker
A time source; returns a time value representing the number of nanoseconds elapsed since some
fixed but arbitrary point in time.
|
class |
Utf8
Low-level, high-performance utility methods related to the UTF-8
character encoding.
|
class |
Verify
Static convenience methods that serve the same purpose as Java language
assertions, except that they are always enabled.
|
class |
VerifyException
Exception thrown upon the failure of a
verification
check, including those performed by the convenience methods of the
Verify class. |
Modifier and Type | Method and Description |
---|---|
static <T> Predicate<T> |
Predicates.alwaysFalse()
Returns a predicate that always evaluates to
false . |
static <T> Predicate<T> |
Predicates.alwaysTrue()
Returns a predicate that always evaluates to
true . |
static <T> Predicate<T> |
Predicates.isNull()
Returns a predicate that evaluates to
true if the object reference
being tested is null. |
static <T> Predicate<T> |
Predicates.notNull()
Returns a predicate that evaluates to
true if the object reference
being tested is not null. |
<S extends T> |
Equivalence.pairwise()
Returns an equivalence over iterables based on the equivalence of their elements.
|
Modifier and Type | Class and Description |
---|---|
class |
AbstractCache<K,V>
This class provides a skeletal implementation of the
Cache interface to minimize the
effort required to implement this interface. |
interface |
Cache<K,V>
A semi-persistent mapping from keys to values.
|
class |
CacheBuilder<K,V>
A builder of
LoadingCache and Cache instances having any combination of the
following features:
automatic loading of entries into the cache
least-recently-used eviction when a maximum size is exceeded
time-based expiration of entries, measured since last access or last write
keys automatically wrapped in weak references
values automatically wrapped in weak or
soft references
notification of evicted (or otherwise removed) entries
accumulation of cache access statistics
|
class |
CacheLoader<K,V>
Computes or retrieves values, based on a key, for use in populating a
LoadingCache . |
class |
CacheStats
Statistics about the performance of a
Cache . |
interface |
LoadingCache<K,V>
A semi-persistent mapping from keys to values.
|
class |
RemovalCause
The reason why a cached entry was removed.
|
interface |
RemovalListener<K,V>
An object that can receive a notification when an entry is removed from a cache.
|
class |
RemovalNotification<K,V>
A notification of the removal of a single entry.
|
interface |
Weigher<K,V>
Calculates the weights of cache entries.
|
Modifier and Type | Class and Description |
---|---|
class |
AbstractIterator<T>
This class provides a skeletal implementation of the
Iterator
interface, to make this interface easier to implement for certain types of
data sources. |
class |
AbstractSequentialIterator<T>
This class provides a skeletal implementation of the
Iterator
interface for sequences whose next element can always be derived from the
previous element. |
class |
ArrayListMultimap<K,V>
Implementation of
Multimap that uses an ArrayList to store
the values for a given key. |
class |
ArrayTable<R,C,V>
Fixed-size
Table implementation backed by a two-dimensional array. |
interface |
BiMap<K,V>
A bimap (or "bidirectional map") is a map that preserves the uniqueness of
its values as well as that of its keys.
|
class |
BinaryTreeTraverser<T>
A variant of
TreeTraverser for binary trees, providing additional traversals specific to
binary trees. |
class |
BoundType
Indicates whether an endpoint of some range is contained in the range itself ("closed") or not
("open").
|
interface |
ClassToInstanceMap<B>
A map, each entry of which maps a Java
raw type to an instance of that type.
|
class |
Collections2
Provides static methods for working with
Collection instances. |
class |
ComparisonChain
A utility for performing a chained comparison statement.
|
class |
ComputationException
Wraps an exception that occurred during a computation.
|
class |
ContiguousSet<C extends Comparable>
A sorted set of contiguous values in a given
DiscreteDomain . |
class |
DiscreteDomain<C extends Comparable>
A descriptor for a discrete
Comparable domain such as all
Integer instances. |
class |
EnumBiMap<K extends Enum<K>,V extends Enum<V>>
A
BiMap backed by two EnumMap instances. |
class |
EnumHashBiMap<K extends Enum<K>,V>
A
BiMap backed by an EnumMap instance for keys-to-values, and
a HashMap instance for values-to-keys. |
class |
EnumMultiset<E extends Enum<E>>
Multiset implementation backed by an
EnumMap . |
class |
FluentIterable<E>
FluentIterable provides a rich interface for manipulating Iterable instances in a
chained fashion. |
class |
ForwardingCollection<E>
A collection which forwards all its method calls to another collection.
|
class |
ForwardingConcurrentMap<K,V>
A concurrent map which forwards all its method calls to another concurrent
map.
|
class |
ForwardingIterator<T>
An iterator which forwards all its method calls to another iterator.
|
class |
ForwardingList<E>
A list which forwards all its method calls to another list.
|
class |
ForwardingListIterator<E>
A list iterator which forwards all its method calls to another list
iterator.
|
class |
ForwardingListMultimap<K,V>
A list multimap which forwards all its method calls to another list multimap.
|
class |
ForwardingMap<K,V>
A map which forwards all its method calls to another map.
|
class |
ForwardingMapEntry<K,V>
A map entry which forwards all its method calls to another map entry.
|
class |
ForwardingMultimap<K,V>
A multimap which forwards all its method calls to another multimap.
|
class |
ForwardingMultiset<E>
A multiset which forwards all its method calls to another multiset.
|
class |
ForwardingObject
An abstract base class for implementing the decorator pattern.
|
class |
ForwardingQueue<E>
A queue which forwards all its method calls to another queue.
|
class |
ForwardingSet<E>
A set which forwards all its method calls to another set.
|
class |
ForwardingSetMultimap<K,V>
A set multimap which forwards all its method calls to another set multimap.
|
class |
ForwardingSortedMap<K,V>
A sorted map which forwards all its method calls to another sorted map.
|
class |
ForwardingSortedMultiset<E>
A sorted multiset which forwards all its method calls to another sorted multiset.
|
class |
ForwardingSortedSet<E>
A sorted set which forwards all its method calls to another sorted set.
|
class |
ForwardingSortedSetMultimap<K,V>
A sorted set multimap which forwards all its method calls to another sorted
set multimap.
|
class |
ForwardingTable<R,C,V>
A table which forwards all its method calls to another table.
|
class |
HashBasedTable<R,C,V>
Implementation of
Table using hash tables. |
class |
HashBiMap<K,V>
A
BiMap backed by two hash tables. |
class |
HashMultimap<K,V>
Implementation of
Multimap using hash tables. |
class |
HashMultiset<E>
Multiset implementation backed by a
HashMap . |
class |
ImmutableBiMap<K,V>
An immutable
BiMap with reliable user-specified iteration order. |
class |
ImmutableCollection<E>
An immutable collection.
|
class |
ImmutableList<E>
A high-performance, immutable, random-access
List implementation. |
class |
ImmutableListMultimap<K,V>
An immutable
ListMultimap with reliable user-specified key and value
iteration order. |
class |
ImmutableMap<K,V>
An immutable, hash-based
Map with reliable user-specified iteration
order. |
class |
ImmutableMultimap<K,V>
An immutable
Multimap . |
class |
ImmutableMultiset<E>
An immutable hash-based multiset.
|
class |
ImmutableSet<E>
A high-performance, immutable
Set with reliable, user-specified
iteration order. |
class |
ImmutableSetMultimap<K,V>
An immutable
SetMultimap with reliable user-specified key and value
iteration order. |
class |
ImmutableSortedMap<K,V>
An immutable
SortedMap . |
class |
ImmutableSortedSet<E>
An immutable
SortedSet that stores its elements in a sorted array. |
class |
ImmutableTable<R,C,V>
An immutable
Table with reliable user-specified iteration order. |
class |
Iterables
This class contains static utility methods that operate on or return objects
of type
Iterable . |
class |
Iterators
This class contains static utility methods that operate on or return objects
of type
Iterator . |
class |
LinkedHashMultimap<K,V>
Implementation of
Multimap that does not allow duplicate key-value
entries and that returns collections whose iterators follow the ordering in
which the data was added to the multimap. |
class |
LinkedHashMultiset<E>
A
Multiset implementation with predictable iteration order. |
class |
LinkedListMultimap<K,V>
An implementation of
ListMultimap that supports deterministic
iteration order for both keys and values. |
interface |
ListMultimap<K,V>
A
Multimap that can hold duplicate key-value pairs and that maintains
the insertion ordering of values for a given key. |
class |
Lists
Static utility methods pertaining to
List instances. |
interface |
MapConstraint<K,V>
A constraint on the keys and values that may be added to a
Map or
Multimap . |
class |
MapConstraints
Factory and utilities pertaining to the
MapConstraint interface. |
interface |
MapDifference<K,V>
An object representing the differences between two maps.
|
class |
MapMaker
A builder of
ConcurrentMap instances having any combination of the following features:
keys or values automatically wrapped in weak or soft references
notification of evicted (or otherwise removed) entries
on-demand computation of values for keys not already present
|
class |
Maps
|
interface |
Multimap<K,V>
A collection that maps keys to values, similar to
Map , but in which
each key may be associated with multiple values. |
class |
MultimapBuilder<K0,V0>
A builder for a multimap implementation that allows customization of the backing map and value
collection implementations used in a particular multimap.
|
class |
Multimaps
Provides static methods acting on or generating a
Multimap . |
interface |
Multiset<E>
A collection that supports order-independent equality, like
Set , but
may have duplicate elements. |
class |
Multisets
Provides static utility methods for creating and working with
Multiset instances. |
class |
ObjectArrays
Static utility methods pertaining to object arrays.
|
class |
Ordering<T>
A comparator, with additional methods to support common operations.
|
interface |
PeekingIterator<E>
An iterator that supports a one-element lookahead while iterating.
|
class |
Range<C extends Comparable>
A range (or "interval") defines the boundaries around a contiguous span of values of some
Comparable type; for example, "integers from 1 to 100 inclusive." Note that it is not
possible to iterate over these contained values. |
interface |
RowSortedTable<R,C,V>
Interface that extends
Table and whose rows are sorted. |
interface |
SetMultimap<K,V>
A
Multimap that cannot hold duplicate key-value pairs. |
class |
Sets
Static utility methods pertaining to
Set instances. |
interface |
SortedMapDifference<K,V>
An object representing the differences between two sorted maps.
|
interface |
SortedMultiset<E>
A
Multiset which maintains the ordering of its elements, according to
either their natural order or an explicit Comparator . |
interface |
SortedSetMultimap<K,V>
A
SetMultimap whose set of values for a given key are kept sorted;
that is, they comprise a SortedSet . |
interface |
Table<R,C,V>
A collection that associates an ordered pair of keys, called a row key and a
column key, with a single value.
|
class |
Tables
Provides static methods that involve a
Table . |
class |
TreeBasedTable<R,C,V>
Implementation of
Table whose row keys and column keys are ordered
by their natural ordering or by supplied comparators. |
class |
TreeMultimap<K,V>
Implementation of
Multimap whose keys and values are ordered by
their natural ordering or by supplied comparators. |
class |
TreeMultiset<E>
A multiset which maintains the ordering of its elements, according to either their natural order
or an explicit
Comparator . |
class |
TreeTraverser<T>
Views elements of a type
T as nodes in a tree, and provides methods to traverse the trees
induced by this traverser. |
class |
UnmodifiableIterator<E>
An iterator that does not support
UnmodifiableIterator.remove() . |
class |
UnmodifiableListIterator<E>
A list iterator that does not support
UnmodifiableIterator.remove() , UnmodifiableListIterator.add(E) , or
UnmodifiableListIterator.set(E) . |
Modifier and Type | Method and Description |
---|---|
static Ordering<Object> |
Ordering.allEqual()
Returns an ordering which treats all values as equal, indicating "no
ordering." Passing this ordering to any stable sort algorithm
results in no change to the order of elements.
|
<U extends T> |
Ordering.compound(Comparator<? super U> secondaryComparator)
Returns an ordering which first uses the ordering
this , but which
in the event of a "tie", then delegates to secondaryComparator . |
static <T> Ordering<T> |
Ordering.compound(Iterable<? extends Comparator<? super T>> comparators)
Returns an ordering which tries each given comparator in order until a
non-zero result is found, returning that result, and returning zero only if
all comparators return zero.
|
static <T> Ordering<T> |
Ordering.explicit(List<T> valuesInOrder)
Returns an ordering that compares objects according to the order in
which they appear in the given list.
|
static <T> Ordering<T> |
Ordering.explicit(T leastValue,
T... remainingValuesInOrder)
Returns an ordering that compares objects according to the order in
which they are given to this method.
|
static <T> Ordering<T> |
Ordering.from(Comparator<T> comparator)
Returns an ordering based on an existing comparator instance.
|
static <T> Ordering<T> |
Ordering.from(Ordering<T> ordering)
Deprecated.
no need to use this
|
static <K,V> Map.Entry<K,V> |
Maps.immutableEntry(K key,
V value)
Returns an immutable map entry with the specified key and value.
|
static <K extends Enum<K>,V> |
Maps.immutableEnumMap(Map<K,? extends V> map)
Returns an immutable map instance containing the given entries.
|
static <E extends Enum<E>> |
Sets.immutableEnumSet(E anElement,
E... otherElements)
Returns an immutable set instance containing the given enum elements.
|
static <E extends Enum<E>> |
Sets.immutableEnumSet(Iterable<E> elements)
Returns an immutable set instance containing the given enum elements.
|
<S extends T> |
Ordering.lexicographical()
Returns a new ordering which sorts iterables by comparing corresponding
elements pairwise until a nonzero result is found; imposes "dictionary
order".
|
static <C extends Comparable> |
Ordering.natural()
Returns a serializable ordering that uses the natural order of the values.
|
static <E> ArrayList<E> |
Lists.newArrayList()
Creates a mutable, empty
ArrayList instance. |
static <E> ArrayList<E> |
Lists.newArrayList(E... elements)
Creates a mutable
ArrayList instance containing the given
elements. |
static <E> ArrayList<E> |
Lists.newArrayList(Iterable<? extends E> elements)
Creates a mutable
ArrayList instance containing the given
elements. |
static <E> ArrayList<E> |
Lists.newArrayList(Iterator<? extends E> elements)
Creates a mutable
ArrayList instance containing the given
elements. |
static <E> ArrayList<E> |
Lists.newArrayListWithCapacity(int initialArraySize)
Creates an
ArrayList instance backed by an array of the
exact size specified; equivalent to
ArrayList.ArrayList(int) . |
static <E> ArrayList<E> |
Lists.newArrayListWithExpectedSize(int estimatedSize)
Creates an
ArrayList instance sized appropriately to hold an
estimated number of elements without resizing. |
static <E> LinkedList<E> |
Lists.newLinkedList()
Creates an empty
LinkedList instance. |
static <E> LinkedList<E> |
Lists.newLinkedList(Iterable<? extends E> elements)
Creates a
LinkedList instance containing the given elements. |
<S extends T> |
Ordering.nullsFirst()
Returns an ordering that treats
null as less than all other values
and uses this to compare non-null values. |
<S extends T> |
Ordering.nullsLast()
Returns an ordering that treats
null as greater than all other
values and uses this ordering to compare non-null values. |
<F> Ordering<F> |
Ordering.onResultOf(Function<F,? extends T> function)
Returns a new ordering on
F which orders elements by first applying
a function to them, then comparing those results using this . |
static <E> Set<Set<E>> |
Sets.powerSet(Set<E> set)
Returns the set of all possible subsets of
set . |
<S extends T> |
Ordering.reverse()
Returns the reverse of this ordering; the
Ordering equivalent to
Collections.reverseOrder(Comparator) . |
static Ordering<Object> |
Ordering.usingToString()
Returns an ordering that compares objects by the natural ordering of their
string representations as returned by
toString() . |
Modifier and Type | Class and Description |
---|---|
class |
ArrayBasedCharEscaper
A
CharEscaper that uses an array to quickly look up replacement
characters for a given char value. |
class |
ArrayBasedEscaperMap
An implementation-specific parameter class suitable for initializing
ArrayBasedCharEscaper or ArrayBasedUnicodeEscaper instances. |
class |
ArrayBasedUnicodeEscaper
A
UnicodeEscaper that uses an array to quickly look up replacement
characters for a given code point. |
class |
CharEscaper
An object that converts literal text into a format safe for inclusion in a particular context
(such as an XML document).
|
class |
CharEscaperBuilder
Simple helper class to build a "sparse" array of objects based on the indexes that were added to
it.
|
class |
Escaper
An object that converts literal text into a format safe for inclusion in a particular context
(such as an XML document).
|
class |
Escapers
Static utility methods pertaining to
Escaper instances. |
class |
UnicodeEscaper
An
Escaper that converts literal text into a format safe for
inclusion in a particular context (such as an XML document). |
Modifier and Type | Class and Description |
---|---|
class |
HtmlEscapers
Escaper instances suitable for strings to be included in HTML
attribute values and most elements' text contents. |
Modifier and Type | Class and Description |
---|---|
class |
BaseEncoding
A binary encoding scheme for reversibly translating between byte sequences and printable ASCII
strings.
|
Modifier and Type | Class and Description |
---|---|
class |
BigIntegerMath
A class for arithmetic on values of type
BigInteger . |
class |
DoubleMath
A class for arithmetic on doubles that is not covered by
Math . |
class |
IntMath
A class for arithmetic on values of type
int . |
class |
LongMath
A class for arithmetic on values of type
long . |
Modifier and Type | Class and Description |
---|---|
class |
HostAndPort
An immutable representation of a host and port.
|
class |
HttpHeaders
Contains constant definitions for the HTTP header field names.
|
class |
InternetDomainName
An immutable well-formed internet domain name, such as
com or foo.co.uk . |
class |
MediaType
Represents an Internet Media Type
(also known as a MIME Type or Content Type).
|
class |
PercentEscaper
A
UnicodeEscaper that escapes some set of Java characters using a
UTF-8 based percent encoding scheme. |
class |
UrlEscapers
Escaper instances suitable for strings to be included in particular
sections of URLs. |
Modifier and Type | Class and Description |
---|---|
class |
Booleans
|
class |
Bytes
|
class |
Chars
|
class |
Doubles
|
class |
Floats
|
class |
Ints
|
class |
Longs
|
class |
Shorts
|
class |
SignedBytes
Static utility methods pertaining to
byte primitives that
interpret values as signed. |
class |
UnsignedInteger
A wrapper class for unsigned
int values, supporting arithmetic operations. |
class |
UnsignedInts
Static utility methods pertaining to
int primitives that interpret values as
unsigned (that is, any negative value x is treated as the positive value
2^32 + x ). |
class |
UnsignedLong
A wrapper class for unsigned
long values, supporting arithmetic operations. |
class |
UnsignedLongs
Static utility methods pertaining to
long primitives that interpret values as
unsigned (that is, any negative value x is treated as the positive value
2^64 + x ). |
Modifier and Type | Class and Description |
---|---|
class |
AtomicLongMap<K>
A map containing
long values that can be atomically updated. |
class |
ExecutionError
Error variant of ExecutionException . |
class |
Runnables
Static utility methods pertaining to the
Runnable interface. |
class |
UncheckedExecutionException
Unchecked variant of
ExecutionException . |
Modifier and Type | Class and Description |
---|---|
class |
XmlEscapers
Escaper instances suitable for strings to be included in XML
attribute values and elements' text contents. |
Copyright © 2010-2014. All Rights Reserved.