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.collect.testing | |
com.google.common.collect.testing.features | |
com.google.common.collect.testing.google | |
com.google.common.collect.testing.testers | |
com.google.common.escape |
Interfaces, utilities, and simple implementations of escapers and encoders.
|
com.google.common.escape.testing |
Testing utilities for use in tests of
com.google.common.escape . |
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.testing |
This package contains testing utilities.
|
com.google.common.util.concurrent |
Concurrency utilities.
|
com.google.common.xml |
Escapers
for
XML.
|
com.google.thirdparty.publicsuffix |
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 an API indicates that the method may not be used with
the Google Web Toolkit (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 |
---|---|
(package private) class |
Absent<T>
Implementation of an
Optional not containing a reference. |
(package private) class |
AbstractIterator<T>
Note this class is a copy of
AbstractIterator (for dependency
reasons). |
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. |
(package private) class |
CommonMatcher
The subset of the
Matcher API which is used by this package, and also
shared with the re2j library. |
(package private) class |
CommonPattern
The subset of the
Pattern API which is used by this package, and also
shared with the re2j library. |
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, and for computing
hash codes in a manner consistent with that equivalence.
|
(package private) class |
ExtraObjectsMethodsForWeb
Holder for extra methods of
Objects only in web. |
interface |
Function<F,T>
Legacy version of
java.util.function.Function . |
(package private) class |
FunctionalEquivalence<F,T>
Equivalence applied on functional result.
|
class |
Functions
Static utility methods pertaining to
com.google.common.base.Function instances; see that
class for information about migrating to java.util.function . |
class |
Joiner
An object which joins pieces of text (specified as an array,
Iterable , varargs or even a
Map ) with a separator. |
class |
MoreObjects
Helper functions that operate on any
Object , and are not already provided in Objects . |
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.
|
(package private) class |
PairwiseEquivalence<T> |
(package private) class |
Platform
Methods factored out so that they can be emulated differently in GWT.
|
class |
Preconditions
Static convenience methods that help a method or constructor check whether it was invoked
correctly (that is, whether its preconditions were met).
|
interface |
Predicate<T>
Legacy version of
java.util.function.Predicate . |
class |
Predicates
Static utility methods pertaining to
Predicate instances. |
(package private) class |
Present<T>
Implementation of an
Optional containing a reference. |
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>
Legacy version of
java.util.function.Supplier . |
class |
Suppliers
Useful suppliers.
|
class |
Throwables
Static utility methods pertaining to instances of
Throwable . |
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.
|
(package private) class |
LocalCache<K,V>
The concurrent hash map implementation built by
CacheBuilder . |
(package private) interface |
LongAddable
Abstract interface for objects that can concurrently add longs.
|
(package private) class |
LongAddables
Source of
LongAddable objects that deals with GWT, Unsafe, and all that. |
(package private) class |
LongAdder
One or more variables that together maintain an initially zero
long sum. |
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 |
---|---|
(package private) class |
AbstractBiMap<K,V>
A general-purpose bimap implementation using any two backing
Map instances. |
(package private) class |
AbstractIndexedListIterator<E>
This class provides a skeletal implementation of the
ListIterator interface across a
fixed number of elements that may be retrieved by position. |
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. |
(package private) class |
AbstractListMultimap<K,V>
Basic implementation of the
ListMultimap interface. |
(package private) class |
AbstractMapBasedMultimap<K,V>
Basic implementation of the
Multimap interface. |
(package private) class |
AbstractMapBasedMultiset<E>
Basic implementation of
Multiset<E> backed by an instance of Map<E, Count> . |
(package private) class |
AbstractMapEntry<K,V>
Implementation of the
equals , hashCode , and toString methods of Entry . |
(package private) class |
AbstractMultimap<K,V>
A skeleton
Multimap implementation, not necessarily in terms of a Map . |
(package private) class |
AbstractMultiset<E>
This class provides a skeletal implementation of the
Multiset interface. |
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. |
(package private) class |
AbstractSetMultimap<K,V>
Basic implementation of the
SetMultimap interface. |
(package private) class |
AbstractSortedKeySortedSetMultimap<K,V>
Basic implementation of a
SortedSetMultimap with a sorted key set. |
(package private) class |
AbstractSortedMultiset<E>
This class provides a skeletal implementation of the
SortedMultiset interface. |
(package private) class |
AbstractSortedSetMultimap<K,V>
Basic implementation of the
SortedSetMultimap interface. |
(package private) class |
AbstractTable<R,C,V>
Skeletal, implementation-agnostic implementation of the
Table interface. |
(package private) class |
AllEqualOrdering
An ordering that treats all references as equals, even nulls.
|
class |
ArrayListMultimap<K,V>
Implementation of
Multimap that uses an ArrayList to store the values for a given
key. |
(package private) class |
ArrayListMultimapGwtSerializationDependencies<K,V>
A dummy superclass to support GWT serialization of the element types of an
ArrayListMultimap . |
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 |
BoundType
Indicates whether an endpoint of some range is contained in the range itself ("closed") or not
("open").
|
(package private) class |
ByFunctionOrdering<F,T>
An ordering that orders elements by applying an order to the result of a function on those
elements.
|
(package private) class |
CartesianList<E>
Implementation of
Lists.cartesianProduct(List) . |
interface |
ClassToInstanceMap<B>
A map, each entry of which maps a Java raw type to an
instance of that type.
|
(package private) class |
CollectCollectors
Collectors utilities for
common.collect internals. |
class |
Collections2
Provides static methods for working with
Collection instances. |
(package private) class |
CollectPreconditions
Precondition checks useful in collection implementations.
|
(package private) class |
CollectSpliterators
Spliterator utilities for
common.collect internals. |
(package private) class |
ComparatorOrdering<T>
An ordering for a pre-existing comparator.
|
class |
Comparators
Provides static methods for working with
Comparator instances. |
class |
ComparisonChain
A utility for performing a chained comparison statement.
|
(package private) class |
CompoundOrdering<T>
An ordering that tries several comparators in order.
|
class |
ComputationException
Wraps an exception that occurred during a computation.
|
(package private) class |
ConsumingQueueIterator<T>
An Iterator implementation which draws elements from a queue, removing them from the queue as it
iterates.
|
class |
ContiguousSet<C extends java.lang.Comparable>
A sorted set of contiguous values in a given
DiscreteDomain . |
(package private) class |
Count
A mutable value of type
int , for multisets to use in tracking counts of values. |
(package private) class |
Cut<C extends java.lang.Comparable>
Implementation detail for the internal structure of
Range instances. |
(package private) class |
DenseImmutableTable<R,C,V>
A
RegularImmutableTable optimized for dense data. |
(package private) class |
DescendingMultiset<E>
A skeleton implementation of a descending multiset.
|
class |
DiscreteDomain<C extends java.lang.Comparable>
A descriptor for a discrete
Comparable domain such as all Integer
instances. |
(package private) class |
EmptyContiguousSet<C extends java.lang.Comparable>
An empty contiguous set.
|
(package private) class |
EmptyImmutableListMultimap
Implementation of
ImmutableListMultimap with no entries. |
(package private) class |
EmptyImmutableSetMultimap
Implementation of
ImmutableListMultimap with no entries. |
class |
EnumBiMap<K extends java.lang.Enum<K>,V extends java.lang.Enum<V>>
A
BiMap backed by two EnumMap instances. |
class |
EnumHashBiMap<K extends java.lang.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 java.lang.Enum<E>>
Multiset implementation specialized for enum elements, supporting all single-element operations
in O(1).
|
class |
EvictingQueue<E>
A non-blocking queue which automatically evicts elements from the head of the queue when
attempting to add new elements onto the queue and it is full.
|
(package private) class |
ExplicitOrdering<T>
An ordering that compares objects according to a given order.
|
(package private) class |
FilteredEntryMultimap<K,V>
Implementation of
Multimaps.filterEntries(Multimap, Predicate) . |
(package private) class |
FilteredEntrySetMultimap<K,V>
Implementation of
Multimaps.filterEntries(SetMultimap, Predicate) . |
(package private) class |
FilteredKeyListMultimap<K,V>
Implementation of
Multimaps.filterKeys(ListMultimap, Predicate) . |
(package private) class |
FilteredKeyMultimap<K,V>
Implementation of
Multimaps.filterKeys(Multimap, Predicate) . |
(package private) class |
FilteredKeySetMultimap<K,V>
Implementation of
Multimaps.filterKeys(SetMultimap, Predicate) . |
(package private) interface |
FilteredMultimap<K,V>
An interface for all filtered multimap types.
|
(package private) class |
FilteredMultimapValues<K,V>
Implementation for
Multimap.values() . |
(package private) interface |
FilteredSetMultimap<K,V>
A supertype for filtered
SetMultimap implementations. |
class |
FluentIterable<E>
A discouraged (but not deprecated) precursor to Java's superior
Stream library. |
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.
|
(package private) class |
ForwardingImmutableCollection
Dummy class that makes the GWT serialization policy happy.
|
(package private) class |
ForwardingImmutableList<E>
Unused stub class, unreferenced under Java and manually emulated under GWT.
|
(package private) class |
ForwardingImmutableMap<K,V>
Unused stub class, unreferenced under Java and manually emulated under GWT.
|
(package private) class |
ForwardingImmutableSet<E>
Unused stub class, unreferenced under Java and manually emulated under GWT.
|
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.
|
(package private) class |
GeneralRange<T>
A generalized interval on any ordering, for internal use.
|
(package private) interface |
GwtTransient
Private replacement for
com.google.gwt.user.client.rpc.GwtTransient to work around
build-system quirks. |
class |
HashBasedTable<R,C,V>
Implementation of
Table using linked hash tables. |
class |
HashBiMap<K,V>
A
BiMap backed by two hash tables. |
(package private) class |
Hashing
Static methods for implementing hash-based collections.
|
class |
HashMultimap<K,V>
Implementation of
Multimap using hash tables. |
(package private) class |
HashMultimapGwtSerializationDependencies<K,V>
A dummy superclass to support GWT serialization of the element types of a
HashMultimap . |
class |
HashMultiset<E>
Multiset implementation backed by a
HashMap . |
(package private) class |
ImmutableAsList<E>
List returned by
ImmutableCollection.asList() that delegates contains checks to the
backing collection. |
class |
ImmutableBiMap<K,V>
A
BiMap whose contents will never change, with many other important properties detailed
at ImmutableCollection . |
class |
ImmutableCollection<E>
A
Collection whose contents will never change, and which offers a few additional
guarantees detailed below. |
(package private) class |
ImmutableEntry<K,V> |
(package private) class |
ImmutableEnumMap<K extends java.lang.Enum<K>,V>
Implementation of
ImmutableMap backed by a non-empty EnumMap . |
(package private) class |
ImmutableEnumSet<E extends java.lang.Enum<E>>
Implementation of
ImmutableSet backed by a non-empty EnumSet . |
class |
ImmutableList<E>
A
List whose contents will never change, with many other important properties detailed at
ImmutableCollection . |
class |
ImmutableListMultimap<K,V>
A
ListMultimap whose contents will never change, with many other important properties
detailed at ImmutableCollection . |
class |
ImmutableMap<K,V>
A
Map whose contents will never change, with many other important properties detailed at
ImmutableCollection . |
(package private) class |
ImmutableMapEntrySet<K,V>
entrySet() implementation for ImmutableMap . |
(package private) class |
ImmutableMapKeySet<K,V>
keySet() implementation for ImmutableMap . |
(package private) class |
ImmutableMapValues<K,V>
values() implementation for ImmutableMap . |
class |
ImmutableMultimap<K,V>
A
Multimap whose contents will never change, with many other important properties
detailed at ImmutableCollection . |
class |
ImmutableMultiset<E>
A
Multiset whose contents will never change, with many other important properties
detailed at ImmutableCollection . |
(package private) class |
ImmutableMultisetGwtSerializationDependencies<E>
A dummy superclass to support GWT serialization of the element type of an
ImmutableMultiset . |
class |
ImmutableSet<E>
A
Set whose contents will never change, with many other important properties detailed at
ImmutableCollection . |
class |
ImmutableSetMultimap<K,V>
A
SetMultimap whose contents will never change, with many other important properties
detailed at ImmutableCollection . |
(package private) class |
ImmutableSortedAsList<E>
List returned by
ImmutableSortedSet.asList() when the set isn't empty. |
class |
ImmutableSortedMap<K,V>
A
NavigableMap whose contents will never change, with many other important properties
detailed at ImmutableCollection . |
class |
ImmutableSortedSet<E>
A
NavigableSet whose contents will never change, with many other important properties
detailed at ImmutableCollection . |
class |
ImmutableTable<R,C,V>
A
Table whose contents will never change, with many other important properties detailed
at ImmutableCollection . |
(package private) class |
IndexedImmutableSet<E> |
class |
Iterables
An assortment of mainly legacy 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 . |
(package private) class |
JdkBackedImmutableBiMap<K,V>
Implementation of ImmutableBiMap backed by a pair of JDK HashMaps, which have smartness
protecting against hash flooding.
|
(package private) class |
JdkBackedImmutableMap<K,V>
Implementation of ImmutableMap backed by a JDK HashMap, which has smartness protecting against
hash flooding.
|
(package private) class |
JdkBackedImmutableMultiset<E>
An implementation of ImmutableMultiset backed by a JDK Map and a list of entries.
|
(package private) class |
JdkBackedImmutableSet<E>
ImmutableSet implementation backed by a JDK HashSet, used to defend against apparent hash
flooding.
|
(package private) class |
LexicographicalOrdering<T>
An ordering which sorts iterables by comparing corresponding elements pairwise.
|
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. |
(package private) class |
LinkedHashMultimapGwtSerializationDependencies<K,V>
A dummy superclass to support GWT serialization of the element types of a
LinkedHashMultimap . |
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 |
MapDifference<K,V>
An object representing the differences between two maps.
|
class |
MapMaker
A builder of
ConcurrentMap instances that can have keys or values automatically wrapped
in weak references. |
class |
Maps
|
(package private) static class |
Maps.ViewCachingAbstractMap<K,V>
AbstractMap extension that makes it easy to cache customized keySet, values, and
entrySet views. |
class |
MinMaxPriorityQueue<E>
A double-ended priority queue, which provides constant-time access to both its least element and
its greatest element, as determined by the queue's specified comparator.
|
class |
MoreCollectors
Collectors not present in
java.util.stream.Collectors that are not otherwise associated
with a com.google.common type. |
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. |
(package private) class |
NaturalOrdering
An ordering that uses the natural order of the values.
|
(package private) class |
NullsFirstOrdering<T>
An ordering that treats
null as less than all other values. |
(package private) class |
NullsLastOrdering<T>
An ordering that treats
null as greater than all other values. |
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.
|
(package private) class |
Platform
Methods factored out so that they can be emulated differently in GWT.
|
class |
Queues
Static utility methods pertaining to
Queue and Deque instances. |
class |
Range<C extends java.lang.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. |
(package private) class |
RangeGwtSerializationDependencies<C extends java.lang.Comparable>
A dummy superclass to support GWT serialization of the element type of a
Range . |
(package private) class |
RegularContiguousSet<C extends java.lang.Comparable>
An implementation of
ContiguousSet that contains one or more elements. |
(package private) class |
RegularImmutableAsList<E>
An
ImmutableAsList implementation specialized for when the delegate collection is already
backed by an ImmutableList or array. |
(package private) class |
RegularImmutableBiMap<K,V>
Bimap with zero or more mappings.
|
(package private) class |
RegularImmutableList<E>
Implementation of
ImmutableList backed by a simple array. |
(package private) class |
RegularImmutableMap<K,V>
Implementation of
ImmutableMap with two or more entries. |
private static class |
RegularImmutableMap.KeySet<K,V> |
private static class |
RegularImmutableMap.Values<K,V> |
(package private) class |
RegularImmutableMultiset<E>
Implementation of
ImmutableMultiset with zero or more elements. |
(package private) class |
RegularImmutableSet<E>
Implementation of
ImmutableSet with two or more elements. |
(package private) class |
RegularImmutableSortedSet<E>
An immutable sorted set with one or more elements.
|
(package private) class |
RegularImmutableTable<R,C,V>
An implementation of
ImmutableTable holding an arbitrary number of cells. |
(package private) class |
ReverseNaturalOrdering
An ordering that uses the reverse of the natural order of the values.
|
(package private) class |
ReverseOrdering<T>
An ordering that uses the reverse of a given order.
|
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. |
(package private) class |
SingletonImmutableBiMap<K,V>
Implementation of
ImmutableMap with exactly one entry. |
(package private) class |
SingletonImmutableList<E>
Implementation of
ImmutableList with exactly one element. |
(package private) class |
SingletonImmutableSet<E>
Implementation of
ImmutableSet with exactly one element. |
(package private) class |
SingletonImmutableTable<R,C,V>
An implementation of
ImmutableTable that holds a single cell. |
(package private) interface |
SortedIterable<T>
An
Iterable whose elements are sorted relative to a Comparator , typically
provided at creation time. |
(package private) class |
SortedIterables
Utilities for dealing with sorted collections of all types.
|
(package private) class |
SortedLists
Static methods pertaining to sorted
List 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 . |
(package private) class |
SortedMultisets
Provides static utility methods for creating and working with
SortedMultiset instances. |
interface |
SortedSetMultimap<K,V>
A
SetMultimap whose set of values for a given key are kept sorted; that is, they comprise
a SortedSet . |
(package private) class |
SparseImmutableTable<R,C,V>
A
RegularImmutableTable optimized for sparse data. |
(package private) class |
StandardRowSortedTable<R,C,V>
Implementation of
Table whose iteration ordering across row keys is sorted by their
natural ordering or by a supplied comparator. |
(package private) class |
StandardTable<R,C,V>
Table implementation backed by a map that associates row keys with column key / value
secondary maps. |
class |
Streams
Static utility methods related to
Stream instances. |
(package private) class |
Synchronized
Synchronized collection views.
|
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 . |
(package private) class |
TopKSelector<T>
An accumulator that selects the "top"
k elements added to it, relative to a provided
comparator. |
(package private) class |
TransformedIterator<F,T>
An iterator that transforms a backing iterator; for internal use.
|
(package private) class |
TransformedListIterator<F,T>
An iterator that transforms a backing list iterator; for internal use.
|
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>
Deprecated.
Use
Traverser instead. All instance methods have
their equivalent on the result of Traverser.forTree(tree) where tree
implements SuccessorsFunction , which has a similar API as TreeTraverser.children(T) or can be
the same lambda function as passed into TreeTraverser.using(Function) .
This class is scheduled to be removed in July 2018. |
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) . |
(package private) class |
UnmodifiableSortedMultiset<E>
Implementation of
Multisets.unmodifiableSortedMultiset(SortedMultiset) , split out into
its own file so it can be GWT emulated (to deal with the differing elementSet() types in GWT and
non-GWT). |
(package private) class |
UsingToStringOrdering
An ordering that uses the natural order of the string representation of the values.
|
(package private) class |
WellBehavedMap<K,V>
Workaround for EnumMap
bug.
|
Modifier and Type | Method and Description |
---|---|
static Ordering<java.lang.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(java.util.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(java.lang.Iterable<? extends java.util.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(java.util.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(java.util.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> java.util.Map.Entry<K,V> |
Maps.immutableEntry(K key,
V value)
Returns an immutable map entry with the specified key and value.
|
static <K extends java.lang.Enum<K>,V> |
Maps.immutableEnumMap(java.util.Map<K,? extends V> map)
Returns an immutable map instance containing the given entries.
|
static <E extends java.lang.Enum<E>> |
Sets.immutableEnumSet(E anElement,
E... otherElements)
Returns an immutable set instance containing the given enum elements.
|
static <E extends java.lang.Enum<E>> |
Sets.immutableEnumSet(java.lang.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 java.lang.Comparable> |
Ordering.natural()
Returns a serializable ordering that uses the natural order of the values.
|
static <E> java.util.ArrayList<E> |
Lists.newArrayList()
Creates a mutable, empty
ArrayList instance (for Java 6 and earlier). |
static <E> java.util.ArrayList<E> |
Lists.newArrayList(E... elements)
Creates a mutable
ArrayList instance containing the given elements. |
static <E> java.util.ArrayList<E> |
Lists.newArrayList(java.lang.Iterable<? extends E> elements)
Creates a mutable
ArrayList instance containing the given elements; a very thin
shortcut for creating an empty list then calling Iterables.addAll(java.util.Collection<T>, java.lang.Iterable<? extends T>) . |
static <E> java.util.ArrayList<E> |
Lists.newArrayList(java.util.Iterator<? extends E> elements)
Creates a mutable
ArrayList instance containing the given elements; a very thin
shortcut for creating an empty list and then calling Iterators.addAll(java.util.Collection<T>, java.util.Iterator<? extends T>) . |
static <E> java.util.ArrayList<E> |
Lists.newArrayListWithCapacity(int initialArraySize)
Creates an
ArrayList instance backed by an array with the specified initial size;
simply delegates to ArrayList(int) . |
static <E> java.util.ArrayList<E> |
Lists.newArrayListWithExpectedSize(int estimatedSize)
Creates an
ArrayList instance to hold estimatedSize elements, plus an
unspecified amount of padding; you almost certainly mean to call Lists.newArrayListWithCapacity(int) (see that method for further advice on usage). |
static <E> java.util.LinkedList<E> |
Lists.newLinkedList()
Creates a mutable, empty
LinkedList instance (for Java 6 and earlier). |
static <E> java.util.LinkedList<E> |
Lists.newLinkedList(java.lang.Iterable<? extends E> elements)
Creates a mutable
LinkedList instance containing the given elements; a very thin
shortcut for creating an empty list then calling Iterables.addAll(java.util.Collection<T>, java.lang.Iterable<? extends T>) . |
<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> java.util.Set<java.util.Set<E>> |
Sets.powerSet(java.util.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<java.lang.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 |
AbstractCollectionTester<E>
Base class for collection testers.
|
class |
AbstractContainerTester<C,E>
Base class for testers of classes (including
Collection and Map )
that contain elements. |
(package private) class |
AbstractIteratorTester<E,I extends java.util.Iterator<E>>
Most of the logic for
IteratorTester and ListIteratorTester . |
class |
AbstractMapTester<K,V>
Base class for map testers.
|
class |
AbstractTester<G>
This abstract base class for testers allows the framework to inject needed information after
JUnit constructs the instances.
|
class |
AnEnum
A sample enumerated type we use for testing.
|
class |
BaseComparable
Simple base class to verify that we handle generics correctly.
|
class |
DerivedCollectionGenerators
Derived suite generators, split out of the suite builders so that they are available to GWT.
|
class |
DerivedComparable
Simple derived class to verify that we handle generics correctly.
|
interface |
DerivedGenerator
A generator that relies on a preexisting generator for most of its work.
|
class |
DerivedTestIteratorGenerator<E>
Adapts a test iterable generator to give a TestIteratorGenerator.
|
class |
Helpers |
class |
IteratorFeature
A method supported by implementations of the
Iterator or ListIterator interface. |
class |
IteratorTester<E>
A utility for testing an Iterator implementation by comparing its behavior to that of a "known
good" reference implementation.
|
class |
ListIteratorTester<E>
A utility similar to
IteratorTester for testing a ListIterator against a known
good reference implementation. |
class |
MapInterfaceTest<K,V>
Tests representing the contract of
Map . |
class |
MinimalCollection<E>
A simplistic collection which implements only the bare minimum allowed by the spec, and throws
exceptions whenever it can.
|
class |
MinimalIterable<E>
An implementation of
Iterable which throws an exception on all invocations of the MinimalIterable.iterator() method after the first, and whose iterator is always unmodifiable. |
class |
MinimalSet<E>
A simplistic set which implements the bare minimum so that it can be used in tests without
relying on any specific Set implementations.
|
class |
OneSizeGenerator<T,E>
Generator for collection of a particular size.
|
interface |
OneSizeTestContainerGenerator<T,E>
The subject-generator interface accepted by Collection testers, for testing a Collection at one
particular
CollectionSize . |
(package private) class |
Platform
Methods factored out so that they can be emulated differently in GWT.
|
class |
SampleElements<E>
A container class for the five sample elements we need for testing.
|
class |
SortedMapInterfaceTest<K,V>
Tests representing the contract of
SortedMap . |
class |
SpliteratorTester<E>
Tester for
Spliterator implementations. |
class |
TestCharacterListGenerator
Generates
List<Character> instances for test suites. |
interface |
TestCollectionGenerator<E>
Creates collections, containing sample elements, to be tested.
|
class |
TestCollidingSetGenerator
A generator using sample elements whose hash codes all collide badly.
|
interface |
TestContainerGenerator<T,E>
To be implemented by test generators of things that can contain elements.
|
class |
TestEnumMapGenerator
Implementation helper for
TestMapGenerator for use with enum maps. |
class |
TestEnumSetGenerator
An abstract TestSetGenerator for generating sets containing enum values.
|
class |
TestIntegerSetGenerator
Create integer sets for collection tests.
|
class |
TestIntegerSortedSetGenerator
Create integer sets for testing collections that are sorted by natural ordering.
|
interface |
TestIteratorGenerator<E>
Creates iterators to be tested.
|
interface |
TestListGenerator<E>
Creates sets, containing sample elements, to be tested.
|
class |
TestMapEntrySetGenerator<K,V>
Creates map entries using sample keys and sample values.
|
interface |
TestMapGenerator<K,V>
Creates maps, containing sample elements, to be tested.
|
interface |
TestQueueGenerator<E>
Creates queues, containing sample elements, to be tested.
|
interface |
TestSetGenerator<E>
Creates sets, containing sample elements, to be tested.
|
interface |
TestSortedMapGenerator<K,V>
Creates sorted maps, containing sample elements, to be tested.
|
interface |
TestSortedSetGenerator<E>
Creates sorted sets, containing sample elements, to be tested.
|
class |
TestStringCollectionGenerator
String creation for testing arbitrary collections.
|
class |
TestStringListGenerator
TODO: javadoc.
|
class |
TestStringMapGenerator
Implementation helper for
TestMapGenerator for use with maps of strings. |
class |
TestStringQueueGenerator
Create queue of strings for tests.
|
class |
TestStringSetGenerator
Create string sets for collection tests.
|
class |
TestStringSortedMapGenerator
Implementation helper for
TestMapGenerator for use with sorted maps of strings. |
class |
TestStringSortedSetGenerator
Create string sets for testing collections that are sorted by natural ordering.
|
interface |
TestSubjectGenerator<T>
To be implemented by test generators that can produce test subjects without requiring any
parameters.
|
class |
TestUnhashableCollectionGenerator<T extends java.util.Collection<UnhashableObject>>
Creates collections containing unhashable sample elements, to be tested.
|
class |
UnhashableObject
An unhashable object to be used in testing as values in our collections.
|
class |
WrongType
A type which will never be used as the element type of any collection in our tests, and so can be
used to test how a Collection behaves when given input of the wrong type.
|
Modifier and Type | Class and Description |
---|---|
class |
CollectionFeature
Optional features of classes derived from
Collection . |
class |
CollectionSize
When describing the features of the collection produced by a given generator (i.e.
|
class |
ConflictingRequirementsException
Thrown when requirements on a tester method or class conflict with each other.
|
interface |
Feature<T>
Base class for enumerating the features of an interface to be tested.
|
class |
ListFeature
Optional features of classes derived from
List . |
class |
MapFeature
Optional features of classes derived from
Map . |
class |
SetFeature
Optional features of classes derived from
Set . |
interface |
TesterAnnotation
Use this to meta-annotate
XxxFeature.Require annotations, so that those annotations can
be used to decide whether to apply a test to a given class-under-test. |
class |
TesterRequirements
Encapsulates the constraints that a class under test must satisfy in order for a tester method to
be run against that class.
|
Modifier and Type | Class and Description |
---|---|
class |
AbstractBiMapTester<K,V>
Skeleton for a tester of a
BiMap . |
class |
AbstractListMultimapTester<K,V>
Superclass for all
ListMultimap testers. |
class |
AbstractMultimapTester<K,V,M extends Multimap<K,V>>
Superclass for all
Multimap testers. |
class |
AbstractMultisetSetCountTester<E>
Common superclass for
MultisetSetCountUnconditionallyTester and MultisetSetCountConditionallyTester . |
class |
AbstractMultisetTester<E>
Base class for multiset collection tests.
|
class |
BiMapClearTester<K,V>
Tester for
BiMap.clear . |
class |
BiMapEntrySetTester<K,V>
Tester for
BiMap.entrySet and methods on the entries in the set. |
class |
BiMapGenerators
Generators of various
BiMap s and derived collections. |
class |
BiMapInverseTester<K,V>
Tests for the
inverse view of a BiMap. |
class |
BiMapPutTester<K,V>
Tester for
BiMap.put and BiMap.forcePut . |
class |
BiMapRemoveTester<K,V>
Tester for
BiMap.remove . |
class |
DerivedGoogleCollectionGenerators
Derived suite generators for Guava collection interfaces, split out of the suite builders so that
they are available to GWT.
|
(package private) class |
GoogleHelpers
Helper methods/assertions for use with
com.google.common.collect types. |
class |
ListGenerators
Common generators of different types of lists.
|
class |
ListMultimapAsMapTester<K,V>
Testers for
ListMultimap.asMap() . |
class |
ListMultimapEqualsTester<K,V>
Testers for
ListMultimap.equals(Object) . |
class |
ListMultimapPutAllTester<K,V>
Testers for
Multimap.putAll(Object, Iterable) . |
class |
ListMultimapPutTester<K,V>
Testers for
Multimap.put(Object, Object) . |
class |
ListMultimapRemoveTester<K,V>
Testers for
Multimap.remove(Object, Object) . |
class |
ListMultimapReplaceValuesTester<K,V>
Testers for
ListMultimap.replaceValues(Object, Iterable) . |
class |
MapGenerators
Generators of different types of map and related collections, such as keys, entries and values.
|
class |
MultimapAsMapGetTester<K,V>
Tests for
Multimap.asMap().get(Object) . |
class |
MultimapAsMapTester<K,V>
Tests for
Multimap.asMap() . |
class |
MultimapClearTester<K,V>
Tests for
Multimap.clear() . |
class |
MultimapContainsEntryTester<K,V>
|
class |
MultimapContainsKeyTester<K,V>
Tester for the
containsKey methods of Multimap and its asMap() view. |
class |
MultimapContainsValueTester<K,V>
Tester for
Multimap.containsValue(java.lang.Object) . |
class |
MultimapEntriesTester<K,V>
Tester for
Multimap.entries . |
class |
MultimapEqualsTester<K,V>
Tester for
Multimap.equals . |
class |
MultimapFeature
Optional features of classes derived from
Multimap . |
class |
MultimapForEachTester<K,V>
|
class |
MultimapGetTester<K,V>
Tests for
Multimap.get(Object) . |
class |
MultimapKeySetTester<K,V>
Tester for
Multimap.keySet . |
class |
MultimapKeysTester<K,V>
Tester for
Multimap.entries . |
class |
MultimapPutAllMultimapTester<K,V>
Tester for
Multimap.putAll(Multimap) . |
class |
MultimapPutIterableTester<K,V>
Tests for
Multimap.putAll(Object, Iterable) . |
class |
MultimapPutTester<K,V>
Tester for
Multimap.put(K, V) . |
class |
MultimapRemoveAllTester<K,V>
Tests for
Multimap.removeAll(Object) . |
class |
MultimapRemoveEntryTester<K,V>
Tests for
Multimap.remove(Object, Object) . |
class |
MultimapReplaceValuesTester<K,V>
Tests for
Multimap.replaceValues(Object, Iterable) . |
class |
MultimapSizeTester<K,V>
Tester for the
size methods of Multimap and its views. |
class |
MultimapToStringTester<K,V>
Tester for
Multimap.toString() . |
class |
MultimapValuesTester<K,V>
Tester for
Multimap.values . |
class |
MultisetAddTester<E>
Tests for
Multiset.add . |
class |
MultisetContainsTester<E>
Tests for
Multiset.containsAll not already addressed by CollectionContainsTester . |
class |
MultisetCountTester<E>
Tests for
Multiset#count . |
class |
MultisetElementSetTester<E>
Tests for
Multiset.elementSet() not covered by the derived SetTestSuiteBuilder . |
class |
MultisetEntrySetTester<E>
Tests for
Multiset.entrySet . |
class |
MultisetEqualsTester<E>
Tests for
Multiset.equals and Multiset.hashCode . |
class |
MultisetFeature
Optional features of classes derived from
Multiset . |
class |
MultisetForEachEntryTester<E>
Tests for
Multiset#forEachEntry . |
class |
MultisetIteratorTester<E>
Tester to make sure the
iterator().remove() implementation of Multiset works when
there are multiple occurrences of elements. |
class |
MultisetNavigationTester<E>
Tester for navigation of SortedMultisets.
|
class |
MultisetReadsTester<E>
A generic JUnit test which tests multiset-specific read operations.
|
class |
MultisetRemoveTester<E>
Tests for
Multiset#remove , Multiset.removeAll , and Multiset.retainAll not
already covered by the corresponding Collection testers. |
class |
MultisetSerializationTester<E>
A generic JUnit test which tests multiset-specific serialization.
|
class |
MultisetSetCountConditionallyTester<E>
A generic JUnit test which tests conditional
setCount() operations on a multiset. |
class |
MultisetSetCountUnconditionallyTester<E>
A generic JUnit test which tests unconditional
setCount() operations on a multiset. |
class |
SetGenerators
Generators of different types of sets and derived collections from sets.
|
class |
SetMultimapAsMapTester<K,V>
Testers for
SetMultimap.asMap() . |
class |
SetMultimapEqualsTester<K,V>
Testers for
SetMultimap.equals(Object) . |
class |
SetMultimapPutAllTester<K,V>
|
class |
SetMultimapPutTester<K,V>
|
class |
SetMultimapReplaceValuesTester<K,V>
|
class |
SortedMapGenerators
Generators of sorted maps and derived collections.
|
class |
SortedSetMultimapAsMapTester<K,V>
Testers for
SortedSetMultimap.asMap() . |
class |
SortedSetMultimapGetTester<K,V>
Tester for
SortedSetMultimap.get(Object) . |
interface |
TestBiMapGenerator<K,V>
Creates bimaps, containing sample entries, to be tested.
|
class |
TestEnumMultisetGenerator
An abstract
TestMultisetGenerator for generating multisets containing enum values. |
interface |
TestListMultimapGenerator<K,V>
A generator for
ListMultimap implementations based on test data. |
interface |
TestMultimapGenerator<K,V,M extends Multimap<K,V>>
Creates multimaps, containing sample elements, to be tested.
|
interface |
TestMultisetGenerator<E>
Creates multisets, containing sample elements, to be tested.
|
interface |
TestSetMultimapGenerator<K,V>
A generator for
SetMultimap implementations based on test data. |
class |
TestStringBiMapGenerator
Implementation helper for
TestBiMapGenerator for use with bimaps of strings. |
class |
TestStringListMultimapGenerator
A skeleton generator for a
ListMultimap implementation. |
class |
TestStringMultisetGenerator
Create multisets of strings for tests.
|
class |
TestStringSetMultimapGenerator
A skeleton generator for a
SetMultimap implementation. |
class |
UnmodifiableCollectionTests
A series of tests that support asserting that collections cannot be modified, either through
direct or indirect means.
|
Modifier and Type | Class and Description |
---|---|
class |
AbstractListIndexOfTester<E>
Common parent class for
ListIndexOfTester and ListLastIndexOfTester . |
class |
AbstractListTester<E>
Base class for list testers.
|
class |
AbstractQueueTester<E>
Base class for queue collection tests.
|
class |
AbstractSetTester<E> |
class |
CollectionAddAllTester<E>
A generic JUnit test which tests addAll operations on a collection.
|
class |
CollectionAddTester<E>
A generic JUnit test which tests
add operations on a collection. |
class |
CollectionClearTester<E>
A generic JUnit test which tests
clear() operations on a collection. |
class |
CollectionContainsAllTester<E>
A generic JUnit test which tests
containsAll() operations on a collection. |
class |
CollectionContainsTester<E>
A generic JUnit test which tests
contains() operations on a collection. |
class |
CollectionCreationTester<E>
A generic JUnit test which tests creation (typically through a constructor or static factory
method) of a collection.
|
class |
CollectionEqualsTester<E>
Tests
Collection.equals(java.lang.Object) . |
class |
CollectionForEachTester<E>
A generic JUnit test which tests
forEach operations on a collection. |
class |
CollectionIsEmptyTester<E>
A generic JUnit test which tests
isEmpty() operations on a collection. |
class |
CollectionIteratorTester<E>
A generic JUnit test which tests
iterator operations on a collection. |
class |
CollectionRemoveAllTester<E>
A generic JUnit test which tests
removeAll operations on a collection. |
class |
CollectionRemoveIfTester<E>
A generic JUnit test which tests
Collection.removeIf(java.util.function.Predicate<? super E>) . |
class |
CollectionRemoveTester<E>
A generic JUnit test which tests
remove operations on a collection. |
class |
CollectionRetainAllTester<E>
A generic JUnit test which tests
retainAll operations on a collection. |
class |
CollectionSerializationEqualTester<E>
Basic reserialization test for collection types that must preserve
equals() behavior when
reserialized. |
class |
CollectionSerializationTester<E>
Basic reserialization test for collections.
|
class |
CollectionSizeTester<E>
A generic JUnit test which tests
size() operations on a collection. |
class |
CollectionSpliteratorTester<E>
A generic JUnit test which tests
spliterator operations on a collection. |
class |
CollectionStreamTester<E>
A generic JUnit test which tests
stream operations on a collection. |
class |
CollectionToArrayTester<E>
A generic JUnit test which tests
toArray() operations on a collection. |
class |
CollectionToStringTester<E>
A generic JUnit test which tests
toString() operations on a collection. |
class |
ConcurrentMapPutIfAbsentTester<K,V>
A generic JUnit test which tests
putIfAbsent operations on a concurrent map. |
class |
ConcurrentMapRemoveTester<K,V>
Tester for
ConcurrentMap.remove(java.lang.Object, java.lang.Object) . |
class |
ConcurrentMapReplaceEntryTester<K,V>
A generic JUnit test which tests
replace(K, V, V) operations on a concurrent map. |
class |
ConcurrentMapReplaceTester<K,V>
A generic JUnit test which tests
replace(K, V) operations on a concurrent map. |
class |
ListAddAllAtIndexTester<E>
A generic JUnit test which tests
addAll(int, Collection) operations on a list. |
class |
ListAddAllTester<E>
A generic JUnit test which tests
addAll(Collection) operations on a list. |
class |
ListAddAtIndexTester<E>
A generic JUnit test which tests
add(int, Object) operations on a list. |
class |
ListAddTester<E>
A generic JUnit test which tests
add(Object) operations on a list. |
class |
ListCreationTester<E>
A generic JUnit test which tests creation (typically through a constructor or static factory
method) of a list.
|
class |
ListEqualsTester<E>
Tests
List.equals(java.lang.Object) . |
class |
ListGetTester<E>
A generic JUnit test which tests
get() operations on a list. |
class |
ListHashCodeTester<E>
Tests
List.hashCode() . |
class |
ListIndexOfTester<E>
A generic JUnit test which tests
indexOf() operations on a list. |
class |
ListLastIndexOfTester<E>
A generic JUnit test which tests
lastIndexOf() operations on a list. |
class |
ListListIteratorTester<E>
A generic JUnit test which tests
listIterator operations on a list. |
class |
ListRemoveAllTester<E>
A generic JUnit test which tests removeAll operations on a list.
|
class |
ListRemoveAtIndexTester<E>
A generic JUnit test which tests
remove(int) operations on a list. |
class |
ListRemoveTester<E>
A generic JUnit test which tests
remove(Object) operations on a list. |
class |
ListReplaceAllTester<E>
A generic JUnit test which tests
List.replaceAll(java.util.function.UnaryOperator<E>) . |
class |
ListRetainAllTester<E>
A generic JUnit test which tests
retainAll operations on a list. |
class |
ListSetTester<E>
A generic JUnit test which tests
set() operations on a list. |
class |
ListSubListTester<E>
A generic JUnit test which tests
subList() operations on a list. |
class |
ListToArrayTester<E>
A generic JUnit test which tests
toArray() operations on a list. |
class |
MapClearTester<K,V>
A generic JUnit test which tests
clear() operations on a map. |
class |
MapComputeIfAbsentTester<K,V>
A generic JUnit test which tests
Map.computeIfAbsent(K, java.util.function.Function<? super K, ? extends V>) . |
class |
MapComputeIfPresentTester<K,V>
A generic JUnit test which tests
Map.computeIfPresent(K, java.util.function.BiFunction<? super K, ? super V, ? extends V>) . |
class |
MapComputeTester<K,V>
A generic JUnit test which tests
Map.compute(K, java.util.function.BiFunction<? super K, ? super V, ? extends V>) . |
class |
MapContainsKeyTester<K,V>
A generic JUnit test which tests
containsKey() operations on a map. |
class |
MapContainsValueTester<K,V>
A generic JUnit test which tests
containsValue() operations on a map. |
class |
MapCreationTester<K,V>
A generic JUnit test which tests creation (typically through a constructor or static factory
method) of a map.
|
class |
MapEntrySetTester<K,V>
Tests
Map.entrySet() . |
class |
MapEqualsTester<K,V>
Tests
Map.equals(java.lang.Object) . |
class |
MapForEachTester<K,V>
A generic JUnit test which tests
Map.forEach(java.util.function.BiConsumer<? super K, ? super V>) . |
class |
MapGetOrDefaultTester<K,V>
A generic JUnit test which tests
Map.getOrDefault(java.lang.Object, V) . |
class |
MapGetTester<K,V>
A generic JUnit test which tests
get operations on a map. |
class |
MapHashCodeTester<K,V>
Tests
Map.hashCode() . |
class |
MapIsEmptyTester<K,V>
A generic JUnit test which tests
isEmpty() operations on a map. |
class |
MapMergeTester<K,V>
A generic JUnit test which tests
Map.merge(K, V, java.util.function.BiFunction<? super V, ? super V, ? extends V>) . |
class |
MapPutAllTester<K,V>
A generic JUnit test which tests
putAll operations on a map. |
class |
MapPutIfAbsentTester<K,V>
A generic JUnit test which tests
Map.putIfAbsent(K, V) . |
class |
MapPutTester<K,V>
A generic JUnit test which tests
put operations on a map. |
class |
MapRemoveEntryTester<K,V>
Tester for
Map.remove(Object, Object) . |
class |
MapRemoveTester<K,V>
A generic JUnit test which tests
remove operations on a map. |
class |
MapReplaceAllTester<K,V>
A generic JUnit test which tests
replaceAll() operations on a map. |
class |
MapReplaceEntryTester<K,V>
A generic JUnit test which tests
Map.replace(Object, Object, Object) . |
class |
MapReplaceTester<K,V>
A generic JUnit test which tests
Map.replace(Object, Object) . |
class |
MapSerializationTester<K,V>
Basic serialization test for maps.
|
class |
MapSizeTester<K,V>
A generic JUnit test which tests
size() operations on a map. |
class |
MapToStringTester<K,V>
A generic JUnit test which tests
toString() operations on a map. |
(package private) class |
Platform
This class is emulated in GWT.
|
class |
QueueElementTester<E>
A generic JUnit test which tests
element() operations on a queue. |
class |
QueueOfferTester<E>
A generic JUnit test which tests offer operations on a queue.
|
class |
QueuePeekTester<E>
A generic JUnit test which tests
peek() operations on a queue. |
class |
QueuePollTester<E>
A generic JUnit test which tests
poll() operations on a queue. |
class |
QueueRemoveTester<E>
A generic JUnit test which tests
remove() operations on a queue. |
class |
SetAddAllTester<E>
A generic JUnit test which tests addAll operations on a set.
|
class |
SetAddTester<E>
A generic JUnit test which tests add operations on a set.
|
class |
SetCreationTester<E>
A generic JUnit test which tests creation (typically through a constructor or static factory
method) of a set.
|
class |
SetEqualsTester<E>
Tests
Set.equals(java.lang.Object) . |
class |
SetHashCodeTester<E>
Tests
Set.hashCode() . |
class |
SetRemoveTester<E>
A generic JUnit test which tests remove operations on a set.
|
class |
SortedMapNavigationTester<K,V>
A generic JUnit test which tests operations on a SortedMap.
|
class |
SortedSetNavigationTester<E>
A generic JUnit test which tests operations on a SortedSet.
|
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. |
(package private) class |
Platform
Methods factored out so that they can be emulated differently in GWT.
|
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 |
EscaperAsserts
Extra assert methods for testing Escaper implementations.
|
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 . |
(package private) class |
MathPreconditions
A collection of preconditions for math functions.
|
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
Static utility methods pertaining to
boolean primitives, that are not already found in
either Boolean or Arrays . |
private static class |
Booleans.BooleanArrayAsList |
class |
Bytes
Static utility methods pertaining to
byte primitives, that are not already found in
either Byte or Arrays , and interpret bytes as neither signed nor unsigned. |
private static class |
Bytes.ByteArrayAsList |
class |
Chars
Static utility methods pertaining to
char primitives, that are not already found in
either Character or Arrays . |
private static class |
Chars.CharArrayAsList |
class |
Doubles
Static utility methods pertaining to
double primitives, that are not already found in
either Double or Arrays . |
private static class |
Doubles.DoubleArrayAsList |
class |
Floats
Static utility methods pertaining to
float primitives, that are not already found in
either Float or Arrays . |
private static class |
Floats.FloatArrayAsList |
class |
ImmutableDoubleArray
An immutable array of
double values, with an API resembling List . |
class |
ImmutableIntArray
An immutable array of
int values, with an API resembling List . |
class |
ImmutableLongArray
An immutable array of
long values, with an API resembling List . |
class |
Ints
Static utility methods pertaining to
int primitives, that are not already found in either
Integer or Arrays . |
private static class |
Ints.IntArrayAsList |
class |
Longs
Static utility methods pertaining to
long primitives, that are not already found in
either Long or Arrays . |
private static class |
Longs.LongArrayAsList |
(package private) class |
ParseRequest
A string to be parsed as a number and the radix to interpret it in.
|
class |
Shorts
Static utility methods pertaining to
short primitives, that are not already found in
either Short or Arrays . |
private static class |
Shorts.ShortArrayAsList |
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 |
---|---|
(package private) class |
ClusterException
An
ClusterException is a data structure that allows for some code to "throw multiple
exceptions", or something close to it. |
class |
CollectorTester<T,A,R>
Tester for
Collector implementations. |
class |
EqualsTester
Tester for equals() and hashCode() methods of a class.
|
class |
EquivalenceTester<T>
Tester for
Equivalence relationships between groups of objects. |
class |
FakeTicker
A Ticker whose value can be advanced programmatically in test.
|
(package private) class |
Platform
Methods factored out so that they can be emulated differently in GWT.
|
(package private) class |
RelationshipTester<T>
Implementation helper for
EqualsTester and EquivalenceTester that tests for
equivalence classes. |
class |
SerializableTester
Tests serialization and deserialization of an object, optionally asserting that the resulting
object is equal to the original.
|
class |
SloppyTearDown
Simple utility for when you want to create a
TearDown that may throw an exception but
should not fail a test when it does. |
interface |
TearDown
An object that can perform a
TearDown.tearDown() operation. |
interface |
TearDownAccepter
Any object which can accept registrations of
TearDown instances. |
class |
TearDownStack
A
TearDownStack contains a stack of TearDown instances. |
class |
TestLogHandler
Tests may use this to intercept messages that are logged by the code under test.
|
Modifier and Type | Class and Description |
---|---|
(package private) class |
AbstractCatchingFuture<V,X extends java.lang.Throwable,F,T>
Implementations of
Futures.catching* . |
class |
AbstractFuture<V>
An abstract implementation of
ListenableFuture , intended for advanced users only. |
(package private) class |
AbstractTransformFuture<I,O,F,T>
Implementations of
Futures.transform* . |
(package private) class |
AggregateFuture<InputT,OutputT>
A future made up of a collection of sub-futures.
|
(package private) class |
AggregateFutureState
A helper which does some thread-safe operations for aggregate futures, which must be implemented
differently in GWT.
|
interface |
AsyncCallable<V>
Computes a value, possibly asynchronously.
|
interface |
AsyncFunction<I,O>
Transforms a value, possibly asynchronously.
|
class |
AtomicLongMap<K>
A map containing
long values that can be atomically updated. |
class |
Callables
Static utility methods pertaining to the
Callable interface. |
interface |
CheckedFuture<V,X extends java.lang.Exception>
Deprecated.
CheckedFuture cannot properly support the chained operations that are the
primary goal of ListenableFuture . CheckedFuture also encourages users to
rethrow exceptions from one thread in another thread, producing misleading stack traces.
Additionally, it has a surprising policy about which exceptions to map and which to leave
untouched. Guava users who want a CheckedFuture can fork the classes for their own
use, possibly specializing them to the particular exception type they use. We recommend that
most people use ListenableFuture and perform any exception wrapping themselves. This
class is scheduled for removal from Guava in February 2018. |
(package private) class |
CollectionFuture<V,C>
Aggregate future that collects (stores) results of each future.
|
(package private) class |
CombinedFuture<V>
Aggregate future that computes its value by calling a callable.
|
class |
ExecutionError
Error variant of ExecutionException . |
class |
FluentFuture<V>
A
ListenableFuture that supports fluent chains of operations. |
(package private) class |
ForwardingFluentFuture<V>
FluentFuture that forwards all calls to a delegate. |
class |
ForwardingFuture<V>
A
Future which forwards all its method calls to another future. |
class |
ForwardingListenableFuture<V>
A
ListenableFuture which forwards all its method calls to another future. |
interface |
FutureCallback<V>
A callback for accepting the results of a
Future computation
asynchronously. |
class |
Futures
Static utility methods pertaining to the
Future interface. |
static class |
Futures.FutureCombiner<V>
A helper to create a new
ListenableFuture whose result is generated from a combination
of input futures. |
(package private) class |
GwtFluentFutureCatchingSpecialization<V>
Hidden superclass of
FluentFuture that provides us a place to declare special GWT
versions of the FluentFuture.catching family of methods. |
(package private) class |
GwtFuturesCatchingSpecialization
Hidden superclass of
Futures that provides us a place to declare special GWT versions of
the Futures.catching family of methods. |
(package private) class |
ImmediateFuture<V>
Implementations of
Futures.immediate* . |
(package private) class |
InterruptibleTask<T> |
interface |
ListenableFuture<V>
A
Future that accepts completion listeners. |
interface |
ListenableScheduledFuture<V>
Helper interface to implement both
ListenableFuture and ScheduledFuture . |
class |
MoreExecutors
Factory and utility methods for
Executor , ExecutorService ,
and ThreadFactory . |
(package private) class |
Partially
Outer class that exists solely to let us write
Partially.GwtIncompatible instead of plain
GwtIncompatible . |
(package private) class |
Platform
Methods factored out so that they can be emulated differently in GWT.
|
class |
Runnables
Static utility methods pertaining to the
Runnable interface. |
class |
SettableFuture<V>
A
ListenableFuture whose result can be set by a SettableFuture.set(Object) , SettableFuture.setException(Throwable) or SettableFuture.setFuture(ListenableFuture) call. |
(package private) class |
TrustedListenableFutureTask<V>
A
RunnableFuture that also implements the ListenableFuture interface. |
class |
UncheckedExecutionException
Unchecked variant of
ExecutionException . |
class |
Uninterruptibles
Utilities for treating interruptible operations as uninterruptible.
|
Modifier and Type | Class and Description |
---|---|
class |
XmlEscapers
Escaper instances suitable for strings to be included in XML attribute values and
elements' text contents. |
Modifier and Type | Class and Description |
---|---|
class |
PublicSuffixPatterns
Do not use this class directly.
|
class |
PublicSuffixType
Do not use this class directly.
|
(package private) class |
TrieParser
Parser for a map of reversed domain names stored as a serialized radix tree.
|