com.google.common.collect
Class Sets

java.lang.Object
  extended by com.google.common.collect.Sets

public final class Sets
extends java.lang.Object

Provides static methods for creating mutable Set instances easily and other static methods for working with Sets.

You can replace code like:

Set<String> set = new HashSet<String>();
Collections.addAll(set, "foo", "bar", "baz");

with just:

Set<String> set = newHashSet("foo", "bar", "baz");

You can also create an empty Set, or populate your new Set using any array, Iterator or Iterable.

See also this class's counterparts Lists and Maps.

WARNING: These factories do not support the full variety of tuning parameters available in the collection constructors. Use them only for collections which will always remain small, or for which the cost of future growth operations is not a concern.

Author:
Kevin Bourrillion

Method Summary
static
<E extends java.lang.Enum<E>>
java.util.EnumSet<E>
complementOf(java.util.Collection<E> collection)
          Creates an enum set with the given element type, initially containing all the elements of this type that are not contained in the specified set.
static
<E extends java.lang.Enum<E>>
java.util.EnumSet<E>
complementOf(java.util.Collection<E> collection, java.lang.Class<E> type)
          Creates an enum set with the given element type, initially containing all the elements of this type that are not contained in the specified set.
static
<E> java.util.SortedSet<E>
emptySortedSet()
          Returns the empty sorted set (immutable).
static
<E extends java.lang.Enum<E>>
java.util.Set<E>
immutableEnumSet(E anElement, E... otherElements)
          Returns an immutable Set instance containing the given elements of an enumerated type.
static
<E extends java.lang.Comparable>
java.util.SortedSet<E>
immutableSortedSet()
          Returns an empty sorted set.
static
<E> java.util.SortedSet<E>
immutableSortedSet(java.util.Comparator<? super E> comparator)
          Returns an empty sorted set having the given Comparator.
static
<E> java.util.SortedSet<E>
immutableSortedSet(java.util.Comparator<? super E> comparator, E... elements)
          Returns an immutable SortedSet instance containing the given elements sorted by the given Comparator.
static
<E> java.util.SortedSet<E>
immutableSortedSet(java.util.Comparator<? super E> comparator, E element)
          Returns a sorted set having only the given element and the given Comparator.
static
<E extends java.lang.Comparable>
java.util.SortedSet<E>
immutableSortedSet(E... elements)
          Returns an immutable SortedSet instance containing the given elements sorted by their natural ordering.
static
<E extends java.lang.Comparable>
java.util.SortedSet<E>
immutableSortedSet(E element)
          Returns a sorted set having only the given element.
static
<E> java.util.Set<E>
newConcurrentHashSet()
          Creates a thread-safe set backed by a hash map.
static
<E> java.util.Set<E>
newConcurrentHashSet(E... elements)
          Creates a thread-safe set backed by a hash map, and containing the given elements.
static
<E> java.util.Set<E>
newConcurrentHashSet(java.lang.Iterable<? extends E> elements)
          Creates a thread-safe set backed by a hash map, and containing the given elements.
static
<E> java.util.Set<E>
newConcurrentHashSet(java.util.Iterator<? extends E> elements)
          Creates a thread-safe set backed by a hash map, and containing the given elements.
static
<E extends java.lang.Enum<E>>
java.util.EnumSet<E>
newEnumSet(java.lang.Class<E> elementType, java.lang.Iterable<E> iterable)
          Returns a new EnumSet instance containing the the elements in the given Iterable.
static
<E> java.util.HashSet<E>
newHashSet()
          Creates an empty HashSet instance.
static
<E> java.util.HashSet<E>
newHashSet(E... elements)
          Creates a HashSet instance containing the given elements.
static
<E> java.util.HashSet<E>
newHashSet(java.lang.Iterable<? extends E> elements)
          Creates a HashSet instance containing the given elements.
static
<E> java.util.HashSet<E>
newHashSet(java.util.Iterator<? extends E> elements)
          Creates a HashSet instance containing the given elements.
static
<E> java.util.HashSet<E>
newHashSetWithExpectedSize(int expectedSize)
          Creates a HashSet instance with enough capacity to hold the specified number of elements without rehashing.
static
<E> java.util.LinkedHashSet<E>
newLinkedHashSet()
          Creates an empty LinkedHashSet instance.
static
<E> java.util.LinkedHashSet<E>
newLinkedHashSet(E... elements)
          Creates a LinkedHashSet instance containing the given elements.
static
<E> java.util.LinkedHashSet<E>
newLinkedHashSet(java.lang.Iterable<? extends E> elements)
          Creates a LinkedHashSet instance containing the given elements.
static
<E> java.util.LinkedHashSet<E>
newLinkedHashSet(java.util.Iterator<? extends E> elements)
          Creates a LinkedHashSet instance containing the given elements.
static
<E> java.util.Set<E>
newSetFromMap(java.util.Map<E,java.lang.Boolean> map)
          Returns a set backed by the specified map.
static
<E> java.util.Set<E>
newSoftHashSet()
          Creates a threadsafe Set that uses soft references.
static
<E extends java.lang.Comparable>
SortedArraySet<E>
newSortedArraySet()
          Creates an empty SortedArraySet instance, with an initial capacity of zero.
static
<E> SortedArraySet<E>
newSortedArraySet(java.util.Comparator<? super E> comparator)
          Creates an empty SortedArraySet instance, with an initial capacity of zero.
static
<E> SortedArraySet<E>
newSortedArraySet(java.util.Comparator<? super E> comparator, E... elements)
          Creates a SortedArraySet instance containing the given elements.
static
<E extends java.lang.Comparable>
SortedArraySet<E>
newSortedArraySet(E... elements)
          Creates a SortedArraySet instance containing the given elements.
static
<E extends java.lang.Comparable>
SortedArraySet<E>
newSortedArraySet(java.lang.Iterable<? extends E> elements)
          Creates a SortedArraySet instance containing the given elements.
static
<E> SortedArraySet<E>
newSortedArraySet(java.lang.Iterable<? extends E> elements, java.util.Comparator<? super E> comparator)
          Creates a SortedArraySet instance containing the given elements.
static
<E extends java.lang.Comparable>
java.util.TreeSet<E>
newTreeSet()
          Creates a TreeSet instance using the default Comparator.
static
<E> java.util.TreeSet<E>
newTreeSet(java.util.Comparator<? super E> comparator)
          Creates a TreeSet instance using the given Comparator.
static
<E> java.util.TreeSet<E>
newTreeSet(java.util.Comparator<? super E> comparator, E... elements)
          Creates a TreeSet instance using the given Comparator and containing the given elements.
static
<E> java.util.TreeSet<E>
newTreeSet(java.util.Comparator<? super E> comparator, java.lang.Iterable<? extends E> elements)
          Creates a TreeSet instance using the given Comparator and containing the given elements.
static
<E> java.util.TreeSet<E>
newTreeSet(java.util.Comparator<? super E> comparator, java.util.Iterator<? extends E> elements)
          Creates a TreeSet instance using the given Comparator and containing the given elements.
static
<E extends java.lang.Comparable>
java.util.TreeSet<E>
newTreeSet(E... elements)
          Creates a TreeSet instance using the default Comparator and containing the given elements.
static
<E extends java.lang.Comparable>
java.util.TreeSet<E>
newTreeSet(java.lang.Iterable<? extends E> elements)
          Creates a TreeSet instance using the default Comparator and containing the given elements.
static
<E extends java.lang.Comparable>
java.util.TreeSet<E>
newTreeSet(java.util.Iterator<? extends E> elements)
          Creates a TreeSet instance using the default Comparator and containing the given elements.
static
<E> java.util.Set<E>
newWeakHashSet()
          Creates a threadsafe Set that uses weak references.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

immutableSortedSet

public static <E extends java.lang.Comparable> java.util.SortedSet<E> immutableSortedSet(E... elements)
Returns an immutable SortedSet instance containing the given elements sorted by their natural ordering.

Note: due to a bug in javac 1.5.0_06, we cannot support the following:

SortedSet<Base> set = Sets.immutableSortedSet(sub1, sub2);

where sub1 and sub2 are references to subtypes of Base, not of Base itself. To get around this, you must use:

SortedSet<Base> set = Sets.<Base>immutableSortedSet(sub1, sub2);

Parameters:
elements - the elements that the set should contain
Returns:
an immutable SortedSet instance containing those elements, minus duplicates

immutableSortedSet

public static <E> java.util.SortedSet<E> immutableSortedSet(@Nullable
                                                            java.util.Comparator<? super E> comparator,
                                                            E... elements)
Returns an immutable SortedSet instance containing the given elements sorted by the given Comparator.

Note: due to a bug in javac 1.5.0_06, we cannot support the following:

SortedSet<Base> set = Sets.immutableSortedSet(sub1, sub2);

where sub1 and sub2 are references to subtypes of Base, not of Base itself. To get around this, you must use:

SortedSet<Base> set = Sets.<Base>immutableSortedSet(sub1, sub2);

Parameters:
comparator - the comparator to sort the elements by
elements - the elements that the set should contain
Returns:
an immutable SortedSet instance containing those elements, minus duplicates

immutableSortedSet

public static <E extends java.lang.Comparable> java.util.SortedSet<E> immutableSortedSet()
Returns an empty sorted set. This is an optimization of immutableSortedSet(Comparable...) for zero arguments.

Returns:
an immutable empty sorted set

immutableSortedSet

public static <E> java.util.SortedSet<E> immutableSortedSet(@Nullable
                                                            java.util.Comparator<? super E> comparator)
Returns an empty sorted set having the given Comparator. This is an optimization of immutableSortedSet(Comparator,Object...) for zero arguments.

Parameters:
comparator - the comparator for the empty set
Returns:
an immutable empty sorted set

immutableSortedSet

public static <E extends java.lang.Comparable> java.util.SortedSet<E> immutableSortedSet(E element)
Returns a sorted set having only the given element. This is an optimization of immutableSortedSet(Comparable...) for one argument.

Parameters:
element - the lone element to be in the returned set
Returns:
an immutable sorted set containing only the given element

immutableSortedSet

public static <E> java.util.SortedSet<E> immutableSortedSet(@Nullable
                                                            java.util.Comparator<? super E> comparator,
                                                            @Nullable
                                                            E element)
Returns a sorted set having only the given element and the given Comparator. This is an optimization of immutableSortedSet(Comparator,Object...) for one argument.

Parameters:
comparator - the comparator for the one-element set
element - the lone element to be in the returned set
Returns:
an immutable sorted set containing only the given element

immutableEnumSet

public static <E extends java.lang.Enum<E>> java.util.Set<E> immutableEnumSet(E anElement,
                                                                              E... otherElements)
Returns an immutable Set instance containing the given elements of an enumerated type. Internally this set will be backed by an EnumSet.

Parameters:
anElement - one of the elements the set should contain
otherElements - the rest of the elements the set should contain
Returns:
an immutable Set instance containing these elements, minus duplicates

newEnumSet

public static <E extends java.lang.Enum<E>> java.util.EnumSet<E> newEnumSet(java.lang.Class<E> elementType,
                                                                            java.lang.Iterable<E> iterable)
Returns a new EnumSet instance containing the the elements in the given Iterable. Unlike EnumSet.copyOf(Collection), this method does not produce an exception on any empty Collection, and it may be called on any Iterable, not just a Collection.


newHashSet

public static <E> java.util.HashSet<E> newHashSet()
Creates an empty HashSet instance.

Note: if E is an Enum type, use EnumSet.noneOf(java.lang.Class) instead.

Note: if you only need an immutable empty Set, use Collections.emptySet() instead.

Returns:
a newly-created, initially-empty HashSet

newHashSet

public static <E> java.util.HashSet<E> newHashSet(E... elements)
Creates a HashSet instance containing the given elements.

Note: if E is an Enum type, use EnumSet.of(Enum, Enum...) instead.

Note: if it is an immutable Set you seek, you should use ImmutableSet.

Note: due to a bug in javac 1.5.0_06, we cannot support the following:

Set<Base> set = Sets.newHashSet(sub1, sub2);

where sub1 and sub2 are references to subtypes of Base, not of Base itself. To get around this, you must use:

Set<Base> set = Sets.<Base>newHashSet(sub1, sub2);

Parameters:
elements - the elements that the set should contain
Returns:
a newly-created HashSet containing those elements (minus duplicates)

newHashSetWithExpectedSize

public static <E> java.util.HashSet<E> newHashSetWithExpectedSize(int expectedSize)
Creates a HashSet instance with enough capacity to hold the specified number of elements without rehashing.

Parameters:
expectedSize - the expected size
Returns:
a newly-created HashSet, initially-empty, with enough capacity to hold expectedSize elements without rehashing.
Throws:
java.lang.IllegalArgumentException - if expectedSize is negative

newHashSet

public static <E> java.util.HashSet<E> newHashSet(java.lang.Iterable<? extends E> elements)
Creates a HashSet instance containing the given elements.

Note: if E is an Enum type, and elements is a Collection, use EnumSet.copyOf(Collection) instead.

Parameters:
elements - the elements that the set should contain
Returns:
a newly-created HashSet containing those elements (minus duplicates)

newHashSet

public static <E> java.util.HashSet<E> newHashSet(java.util.Iterator<? extends E> elements)
Creates a HashSet instance containing the given elements.

Note: if E is an Enum type, you should manually create an EnumSet instead.

Parameters:
elements - the elements that the set should contain
Returns:
a newly-created HashSet containing those elements (minus duplicates)

newConcurrentHashSet

public static <E> java.util.Set<E> newConcurrentHashSet()
Creates a thread-safe set backed by a hash map. The set is backed by a ConcurrentHashMap instance, and thus carries the same concurrency guarantees.

Unlike HashSet, this class does NOT allow null to be used as an element.

Returns:
a newly-created, initially-empty thread-safe Set

newConcurrentHashSet

public static <E> java.util.Set<E> newConcurrentHashSet(E... elements)
Creates a thread-safe set backed by a hash map, and containing the given elements. The set is backed by a ConcurrentHashMap instance, and thus carries the same concurrency guarantees.

Please see the notice in newHashSet(Object...) about a relevant javac bug.

Parameters:
elements - the elements that the set should contain
Returns:
a newly-created thread-safe Set containing those elements (minus duplicates)

newConcurrentHashSet

public static <E> java.util.Set<E> newConcurrentHashSet(java.lang.Iterable<? extends E> elements)
Creates a thread-safe set backed by a hash map, and containing the given elements. The set is backed by a ConcurrentHashMap instance, and thus carries the same concurrency guarantees.

Parameters:
elements - the elements that the set should contain
Returns:
a newly-created thread-safe Set containing those elements (minus duplicates)

newConcurrentHashSet

public static <E> java.util.Set<E> newConcurrentHashSet(java.util.Iterator<? extends E> elements)
Creates a thread-safe set backed by a hash map, and containing the given elements. The set is backed by a ConcurrentHashMap instance, and thus carries the same concurrency guarantees.

Parameters:
elements - the elements that the set should contain
Returns:
a newly-created thread-safe Set containing those elements (minus duplicates)

newLinkedHashSet

public static <E> java.util.LinkedHashSet<E> newLinkedHashSet()
Creates an empty LinkedHashSet instance.

Returns:
a newly-created, initially-empty LinkedHashSet

newLinkedHashSet

public static <E> java.util.LinkedHashSet<E> newLinkedHashSet(E... elements)
Creates a LinkedHashSet instance containing the given elements.

Please see the notice in newHashSet(Object...) about a relevant javac bug.

Parameters:
elements - the elements that the set should contain, in order
Returns:
a newly-created LinkedHashSet containing those elements (minus duplicates)

newLinkedHashSet

public static <E> java.util.LinkedHashSet<E> newLinkedHashSet(java.lang.Iterable<? extends E> elements)
Creates a LinkedHashSet instance containing the given elements.

Parameters:
elements - the elements that the set should contain, in order
Returns:
a newly-created LinkedHashSet containing those elements (minus duplicates)

newLinkedHashSet

public static <E> java.util.LinkedHashSet<E> newLinkedHashSet(java.util.Iterator<? extends E> elements)
Creates a LinkedHashSet instance containing the given elements.

Parameters:
elements - the elements that the set should contain, in order
Returns:
a newly-created LinkedHashSet containing those elements (minus duplicates)

newTreeSet

public static <E extends java.lang.Comparable> java.util.TreeSet<E> newTreeSet()
Creates a TreeSet instance using the default Comparator.

Note: If E is an Enum type, and you don't require the set to implement SortedSet (only ordered iteration), use EnumSet.noneOf(java.lang.Class) instead.

Returns:
a newly-created, initially-empty TreeSet

newTreeSet

public static <E extends java.lang.Comparable> java.util.TreeSet<E> newTreeSet(E... elements)
Creates a TreeSet instance using the default Comparator and containing the given elements.

Note: If E is an Enum type, and you don't require the set to implement SortedSet (only ordered iteration), use EnumSet.of(Enum, Enum...) instead.

Please see the notice in newHashSet(Object...) about a relevant javac bug.

Parameters:
elements - the elements that the set should contain
Returns:
a newly-created TreeSet containing those elements (minus duplicates)

newTreeSet

public static <E extends java.lang.Comparable> java.util.TreeSet<E> newTreeSet(java.lang.Iterable<? extends E> elements)
Creates a TreeSet instance using the default Comparator and containing the given elements.

Note: If E is an Enum type, and you don't require the set to implement SortedSet (only ordered iteration), use EnumSet.copyOf(Collection) instead.

Parameters:
elements - the elements that the set should contain
Returns:
a newly-created TreeSet containing those elements (minus duplicates)

newTreeSet

public static <E extends java.lang.Comparable> java.util.TreeSet<E> newTreeSet(java.util.Iterator<? extends E> elements)
Creates a TreeSet instance using the default Comparator and containing the given elements.

Note: if E is an Enum type, and you don't require the set to implement SortedSet (only ordered iteration), you should manually create an EnumSet instead.

Parameters:
elements - the elements that the set should contain
Returns:
a newly-created TreeSet containing those elements (minus duplicates)

newTreeSet

public static <E> java.util.TreeSet<E> newTreeSet(@Nullable
                                                  java.util.Comparator<? super E> comparator)
Creates a TreeSet instance using the given Comparator.

Parameters:
comparator - the comparator to use to sort the set
Returns:
a newly-created, initially-empty TreeSet

newTreeSet

public static <E> java.util.TreeSet<E> newTreeSet(@Nullable
                                                  java.util.Comparator<? super E> comparator,
                                                  E... elements)
Creates a TreeSet instance using the given Comparator and containing the given elements.

Please see the notice in newHashSet(Object...) about a relevant javac bug.

Parameters:
comparator - the comparator to use to sort the set
elements - the elements that the set should contain
Returns:
a newly-created TreeSet containing those elements (minus duplicates)

newTreeSet

public static <E> java.util.TreeSet<E> newTreeSet(@Nullable
                                                  java.util.Comparator<? super E> comparator,
                                                  java.lang.Iterable<? extends E> elements)
Creates a TreeSet instance using the given Comparator and containing the given elements.

Parameters:
comparator - the comparator to use to sort the set
elements - the elements that the set should contain
Returns:
a newly-created TreeSet containing those elements (minus duplicates)

newTreeSet

public static <E> java.util.TreeSet<E> newTreeSet(@Nullable
                                                  java.util.Comparator<? super E> comparator,
                                                  java.util.Iterator<? extends E> elements)
Creates a TreeSet instance using the given Comparator and containing the given elements.

Parameters:
comparator - the comparator to use to sort the set
elements - the elements that the set should contain
Returns:
a newly-created TreeSet containing those elements (minus duplicates)

newWeakHashSet

public static <E> java.util.Set<E> newWeakHashSet()
Creates a threadsafe Set that uses weak references. Its data is stored in a ReferenceMap backed by a ConcurrentHashMap. It does not support null elements.


newSoftHashSet

public static <E> java.util.Set<E> newSoftHashSet()
Creates a threadsafe Set that uses soft references. Its data is stored in a ReferenceMap backed by a ConcurrentHashMap. It does not support null elements.


newSortedArraySet

public static <E extends java.lang.Comparable> SortedArraySet<E> newSortedArraySet()
Creates an empty SortedArraySet instance, with an initial capacity of zero.

TODO: change the initial capacity to the traditional default of ten.

Returns:
a newly-created, initially-empty SortedArraySet

newSortedArraySet

public static <E> SortedArraySet<E> newSortedArraySet(java.util.Comparator<? super E> comparator)
Creates an empty SortedArraySet instance, with an initial capacity of zero.

TODO: change the initial capacity to the traditional default of ten.

Parameters:
comparator - the comparator to use
Returns:
a newly-created, initially-empty SortedArraySet

newSortedArraySet

public static <E extends java.lang.Comparable> SortedArraySet<E> newSortedArraySet(java.lang.Iterable<? extends E> elements)
Creates a SortedArraySet instance containing the given elements.

TODO: change this method to preserve the ordering of the specified iterable if it is an instance of SortedSet.

Parameters:
elements - the elements that the set should contain
Returns:
a newly-created SortedArraySet containing those elements (minus duplicates)

newSortedArraySet

public static <E> SortedArraySet<E> newSortedArraySet(java.lang.Iterable<? extends E> elements,
                                                      java.util.Comparator<? super E> comparator)
Creates a SortedArraySet instance containing the given elements.

TODO: change the initial capacity to the traditional default of ten, if the iterable is not a collection.

Parameters:
elements - the elements that the set should contain
comparator - the comparator to use
Returns:
a newly-created SortedArraySet containing those elements (minus duplicates)

newSortedArraySet

public static <E> SortedArraySet<E> newSortedArraySet(java.util.Comparator<? super E> comparator,
                                                      E... elements)
Creates a SortedArraySet instance containing the given elements.

Please see the notice in newHashSet(Object...) about a relevant javac bug.

Parameters:
comparator - the comparator to use
elements - the elements that the set should contain
Returns:
a newly-created SortedArraySet containing those elements (minus duplicates)

newSortedArraySet

public static <E extends java.lang.Comparable> SortedArraySet<E> newSortedArraySet(E... elements)
Creates a SortedArraySet instance containing the given elements.

Please see the notice in newHashSet(Object...) about a relevant javac bug.

Parameters:
elements - the elements that the set should contain
Returns:
a newly-created SortedArraySet containing those elements (minus duplicates)

complementOf

public static <E extends java.lang.Enum<E>> java.util.EnumSet<E> complementOf(java.util.Collection<E> collection)
Creates an enum set with the given element type, initially containing all the elements of this type that are not contained in the specified set. If the specified collection is an EnumSet instance, this method behaves identically to EnumSet.complementOf(java.util.EnumSet). Otherwise, the specified collection must contain at least one element (in order to determine the new enum set's element type). If the collection could possibly be empty, use complementOf(Collection,Class) instead of this method.

Parameters:
collection - the collection from whose complement to initialize the enum set
Returns:
a new, modifiable enum set initially containing all the values of the enum not present in the given set
Throws:
java.lang.IllegalArgumentException - if set is not an EnumSet instance and contains no elements

complementOf

public static <E extends java.lang.Enum<E>> java.util.EnumSet<E> complementOf(java.util.Collection<E> collection,
                                                                              java.lang.Class<E> type)
Creates an enum set with the given element type, initially containing all the elements of this type that are not contained in the specified set. This is equivalent to EnumSet.complementOf(java.util.EnumSet), but can act on any type of set, so long as the elements are of enum type.

Parameters:
collection - the collection from whose complement to initialize this enum set
type - the type of the elements in the set
Returns:
a new, modifiable enum set initially containing all the values of the enum not present in the given set

newSetFromMap

public static <E> java.util.Set<E> newSetFromMap(java.util.Map<E,java.lang.Boolean> map)
Returns a set backed by the specified map. The resulting set displays the same ordering, concurrency, and performance characteristics as the backing map. In essence, this factory method provides a Set implementation corresponding to any Map implementation. There is no need to use this method on a Map implementation that already has a corresponding Set implementation (such as HashMap or TreeMap).

Each method invocation on the set returned by this method results in exactly one method invocation on the backing map or its keySet view, with one exception. The addAll method is implemented as a sequence of put invocations on the backing map.

The specified map must be empty at the time this method is invoked, and should not be accessed directly after this method returns. These conditions are ensured if the map is created empty, passed directly to this method, and no reference to the map is retained, as illustrated in the following code fragment:

    Set<Object> identityHashSet = Sets.newSetFromMap(
        new IdentityHashMap<Object, Boolean>());
 
This method has the same behavior as the JDK 6 method Collections.newSetFromMap().

Parameters:
map - the backing map
Returns:
the set backed by the map
Throws:
java.lang.IllegalArgumentException - if map is not empty

emptySortedSet

public static <E> java.util.SortedSet<E> emptySortedSet()
Returns the empty sorted set (immutable). This set is serializable.



Copyright © 2008 Google. All Rights Reserved.