Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV NEXT | FRAMES NO FRAMES

## Deprecated API

Contents

- Deprecated Interfaces
- Deprecated Classes
- Deprecated Exceptions
- Deprecated Methods
- Deprecated Constructors

Deprecated Interfaces
com.google.common.collect.MapEvictionListener use `MapMaker.RemovalListener` This class is scheduled for deletion from Guava in Guava release 11.0.
com.google.common.util.concurrent.UninterruptibleFuture Use `getUninterruptibly`. Scheduled for deletion in Guava Release 11.

Deprecated Classes
com.google.common.util.concurrent.AbstractListenableFuture Use `AbstractFuture`. This class is scheduled for deletion from Guava in Guava release 11.0.
com.google.common.collect.EvictionListeners Caching functionality in `MapMaker` is being moved to `CacheBuilder`. Functionality similar to `EvictionListeners` is provided by `RemovalListeners`. This class is scheduled for deletion from Guava in Guava release 11.0.

Deprecated Exceptions
com.google.common.collect.AsynchronousComputationException this class is unused by com.google.common.collect. This class is scheduled for deletion in November 2012.

Deprecated Methods
com.google.common.cache.ForwardingCache.apply(K)
com.google.common.collect.EvictionListeners.asynchronous(MapEvictionListener, Executor) Caching functionality in `MapMaker` is being moved to `CacheBuilder`. Functionality similar to `EvictionListeners#asynchronous` is provided by `RemovalListeners.asynchronous(com.google.common.cache.RemovalListener, java.util.concurrent.Executor)`. This method is scheduled for deletion from Guava in Guava release 11.0.
com.google.common.util.concurrent.AbstractFuture.cancel() Most implementations will be satisfied with the default implementation of `AbstractFuture.cancel(boolean)` and not need to call this method at all. Those that are not can delegate to `super.cancel(mayInterruptIfRunning)` or, to get behavior exactly equivalent to this method, `super.cancel(false)`. This method will be removed from Guava in Guava release 11.0.
com.google.common.collect.ArrayTable.clear() Use `ArrayTable.eraseAll()`
com.google.common.io.Files.deleteDirectoryContents(File)
com.google.common.io.Files.deleteRecursively(File)
com.google.common.util.concurrent.AbstractFuture.done()
com.google.common.collect.MapMaker.evictionListener(MapEvictionListener) Caching functionality in `MapMaker` is being moved to `CacheBuilder`. Functionality similar to `MapMaker.evictionListener(com.google.common.collect.MapEvictionListener)` is provided by `CacheBuilder.removalListener(com.google.common.cache.RemovalListener)` which also provides additional information about the entry being evicted; note that `evictionListener` only notifies on removals due to eviction, while `removalListener` also notifies on explicit removal (providing the `RemovalCause` to indicate the specific cause of removal. This method is scheduled for deletion in Guava release 11.
com.google.common.collect.GenericMapMaker.expiration(long, TimeUnit)
com.google.common.collect.MapMaker.expiration(long, TimeUnit) Caching functionality in `MapMaker` is being moved to `CacheBuilder`. Functionality equivalent to `MapMaker.expiration(long, java.util.concurrent.TimeUnit)` is provided by `CacheBuilder.expireAfterWrite(long, java.util.concurrent.TimeUnit)`. This method is scheduled for deletion in July 2012.
com.google.common.collect.GenericMapMaker.expireAfterAccess(long, TimeUnit)
com.google.common.collect.MapMaker.expireAfterAccess(long, TimeUnit)
com.google.common.collect.GenericMapMaker.expireAfterWrite(long, TimeUnit)
com.google.common.collect.MapMaker.expireAfterWrite(long, TimeUnit)
com.google.common.collect.Ordering.from(Ordering) no need to use this
com.google.common.net.InternetDomainName.fromLenient(String) Use `InternetDomainName.from(String)`
com.google.common.collect.Multimaps.index(I, Function) use `Multimaps.index(Iterator, Function)` by casting `values` to `Iterator<V>`, or better yet, by implementing only `Iterator` and not `Iterable`. This method is scheduled for deletion in March 2012.
com.google.common.net.InternetDomainName.isValidLenient(String) Use `InternetDomainName.isValid(String)` instead
com.google.common.util.concurrent.Futures.makeChecked(Future, Function) Obtain a `ListenableFuture`, following the advice in its documentation and use `Futures.makeChecked(ListenableFuture, Function)`. This method is scheduled for deletion from Guava in Guava release 11.0.
com.google.common.collect.GenericMapMaker.makeComputingMap(Function)
com.google.common.collect.MapMaker.makeComputingMap(Function)
com.google.common.util.concurrent.Futures.makeListenable(Future) Prefer to create `ListenableFuture` instances with `SettableFuture`, `MoreExecutors.listeningDecorator( java.util.concurrent.ExecutorService)`, `ListenableFutureTask`, `AbstractFuture`, and other utilities over creating plain `Future` instances to be upgraded to `ListenableFuture` after the fact. If this is not possible, the functionality of `makeListenable` is now available as `JdkFutureAdapters.listenInPoolThread(java.util.concurrent.Future)`. This method is scheduled for deletion from Guava in Guava release 11.0.
com.google.common.util.concurrent.Futures.makeUninterruptible(Future) Use `getUninterruptibly`. This method is scheduled for deletion in Guava Release 11.
com.google.common.collect.GenericMapMaker.maximumSize(int)
com.google.common.collect.MapMaker.maximumSize(int)
com.google.common.collect.ImmutableMultiset.of(E[]) use `ImmutableMultiset.copyOf(Object[])`. This method is scheduled for deletion in January 2012.
com.google.common.collect.ImmutableSet.of(E[]) use `ImmutableSet.copyOf(Object[])`. This method is scheduled for deletion in October 2011.
com.google.common.collect.ImmutableList.of(E[]) use `ImmutableList.copyOf(Object[])`. This method is scheduled for deletion in October 2011.
com.google.common.collect.ImmutableSortedSet.of(E[]) use `ImmutableSortedSet.copyOf(Comparable[])`. This method is scheduled for deletion in October 2011.
com.google.common.base.Equivalences.pairwise(Equivalence) use `Equivalence.pairwise()`, which behaves exactly the same. This method is scheduled for deletion from Guava in Guava release 11.0.
com.google.common.collect.Iterators.peekingIterator(PeekingIterator) no need to use this
com.google.common.collect.ArrayTable.remove(Object, Object) Use `ArrayTable.erase(java.lang.Object, java.lang.Object)`
com.google.common.collect.Iterables.reverse(List) use `Lists.reverse(List)` or `ImmutableList.reverse()`. This method is scheduled for deletion in July 2012.
com.google.common.util.concurrent.ExecutionList.run() Use `ExecutionList.execute()`. This method will be removed in Guava release 11.
com.google.common.collect.GenericMapMaker.softKeys()
com.google.common.collect.MapMaker.softKeys() use `MapMaker.softValues()` to create a memory-sensitive map, or `MapMaker.weakKeys()` to create a map that doesn't hold strong references to the keys. This method is scheduled for deletion in January 2013.
com.google.common.collect.ForwardingMultiset.standardElementSet() Use the `StandardElementSet` constructor instead. This method will be removed from Guava in Guava release 11.0.
com.google.common.collect.ForwardingMap.standardEntrySet(Supplier>>) Use `StandardEntrySet` instead. This method will be removed from Guava in Guava release 11.0.
com.google.common.collect.ForwardingMap.standardKeySet() Use the `StandardKeySet` constructor instead. This method will be removed from Guava in Guava release 11.0.
com.google.common.collect.ForwardingMap.standardValues() Use the `StandardValues` constructor instead. This method will be removed from Guava in Guava release 11.0.
com.google.common.base.Throwables.throwCause(Exception, boolean) For `throwCause(e, false)`, use `propagateIfPossible(e.getCause(), Exception.class); throw e;`. For `throwCause(e, true)`, there is no exact equivalent. Callers are encouraged to consider whether the cause contains all useful stack trace context. (It usually does if it comes from within the thread, e.g., for an `InvocationTargetException`, and it usually does not otherwise, e.g., for an `ExecutionException`.) If the cause contains all useful context, consider throwing it directly if your method signature permits or wrapping it in an appropriate exception if not. If the cause does not contain all useful context, consider propagating the wrapper exception or rewrapping the cause in an appropriate exception. For the particular case of exceptions thrown by `Future.get`, consider `Futures.get(java.util.concurrent.Future, Class)`. This method will be removed from Guava in Guava release 11.0.
com.google.common.util.concurrent.Futures.transform(Future, Function) Obtain a `ListenableFuture` (following the advice in its documentation) and use `Futures.transform(ListenableFuture, Function)` or use `Futures.lazyTransform(Future, Function)`, which will apply the transformation on each call to `get()`. This method is scheduled for deletion from Guava in Guava release 11.0.
com.google.common.collect.Maps.uniqueIndex(I, Function) use `Maps.uniqueIndex(Iterator, Function)` by casting `values` to `Iterator<V>`, or better yet, by implementing only `Iterator` and not `Iterable`. This method is scheduled for deletion in March 2012.
com.google.common.collect.Iterables.unmodifiableIterable(ImmutableCollection) no need to use this
com.google.common.collect.Iterators.unmodifiableIterator(UnmodifiableIterator) no need to use this
com.google.common.collect.Multimaps.unmodifiableListMultimap(ImmutableListMultimap) no need to use this
com.google.common.collect.Multimaps.unmodifiableMultimap(ImmutableMultimap) no need to use this
com.google.common.collect.Multisets.unmodifiableMultiset(ImmutableMultiset) no need to use this
com.google.common.collect.Multimaps.unmodifiableSetMultimap(ImmutableSetMultimap) no need to use this
com.google.common.io.LittleEndianDataOutputStream.writeBytes(String) The semantics of `writeBytes(String s)` are considered dangerous. Please use `LittleEndianDataOutputStream.writeUTF(String s)`, `LittleEndianDataOutputStream.writeChars(String s)` or another write method instead.
com.google.common.io.ByteArrayDataOutput.writeBytes(String) This method is dangerous as it discards the high byte of every character. For UTF-8, use `write(s.getBytes(Charsets.UTF_8))`.

Deprecated Constructors
com.google.common.util.concurrent.ListenableFutureTask(Callable)
com.google.common.util.concurrent.ListenableFutureTask(Runnable, V)

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV NEXT | FRAMES NO FRAMES

Copyright © 2010-2011. All Rights Reserved.