| Package | Description | 
|---|---|
| com.google.common.base | Basic utility libraries and interfaces. | 
| com.google.common.collect | This package contains generic collection interfaces and implementations, and
 other utilities for working with collections. | 
| 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.net | This package contains utility methods and classes for working with net
 addresses (numeric IP and domain names). | 
| Modifier and Type | Method and Description | 
|---|---|
| static <T> Optional<T> | Optional. absent()Returns an  Optionalinstance with no contained reference. | 
| static <T> Optional<T> | Optional. fromNullable(T nullableReference)If  nullableReferenceis non-null, returns anOptionalinstance containing that
 reference; otherwise returnsabsent(). | 
| static <T extends Enum<T>>  | Enums. getIfPresent(Class<T> enumClass,
                        String value)Returns an optional enum constant for the given type, using  Enum.valueOf(java.lang.Class<T>, java.lang.String). | 
| static <T> Optional<T> | Optional. of(T reference)Returns an  Optionalinstance containing the given non-null reference. | 
| abstract Optional<T> | Optional. or(Optional<? extends T> secondChoice)Returns this  Optionalif it has a value present;secondChoiceotherwise. | 
| abstract <V> Optional<V> | Optional. transform(Function<? super T,V> function) | 
| Modifier and Type | Method and Description | 
|---|---|
| abstract Optional<T> | Optional. or(Optional<? extends T> secondChoice)Returns this  Optionalif it has a value present;secondChoiceotherwise. | 
| Modifier and Type | Method and Description | 
|---|---|
| static <T> Iterable<T> | Optional. presentInstances(Iterable<? extends Optional<? extends T>> optionals)Returns the value of each present instance from the supplied  optionals, in order,
 skipping over occurrences ofabsent(). | 
| Modifier and Type | Method and Description | 
|---|---|
| Optional<E> | FluentIterable. first()Returns an  Optionalcontaining the first element in this fluent iterable. | 
| Optional<E> | FluentIterable. firstMatch(Predicate<? super E> predicate)Returns an  Optionalcontaining the first element in this fluent iterable that
 satisfies the given predicate, if such an element exists. | 
| Optional<E> | FluentIterable. last()Returns an  Optionalcontaining the last element in this fluent iterable. | 
| abstract Optional<T> | BinaryTreeTraverser. leftChild(T root)Returns the left child of the specified node, or  absent()if the specified
 node has no left child. | 
| abstract Optional<T> | BinaryTreeTraverser. rightChild(T root)Returns the right child of the specified node, or  absent()if the specified
 node has no right child. | 
| static <T> Optional<T> | Iterables. tryFind(Iterable<T> iterable,
              Predicate<? super T> predicate)Returns an  Optionalcontaining the first element initerablethat satisfies the given predicate, if such an element exists. | 
| static <T> Optional<T> | Iterators. tryFind(Iterator<T> iterator,
              Predicate<? super T> predicate)Returns an  Optionalcontaining the first element initeratorthat satisfies the given predicate, if such an element exists. | 
| Modifier and Type | Method and Description | 
|---|---|
| Optional<Long> | CharSource. lengthIfKnown()Returns the size of this source in chars, if the size can be easily determined without
 actually opening the data stream. | 
| Optional<Long> | ByteSource. sizeIfKnown()Returns the size of this source in bytes, if the size can be easily determined without
 actually opening the data stream. | 
| Modifier and Type | Method and Description | 
|---|---|
| Optional<Charset> | MediaType. charset()Returns an optional charset for the value of the charset parameter if it is specified. | 
Copyright © 2010-2015. All Rights Reserved.