Deprecated Methods |
com.google.common.base.Joiner.appendTo(A, I)
use Joiner.appendTo(Appendable, Iterator) by casting parts to
Iterator<?> , or better yet, by implementing only Iterator and not
Iterable . This method is scheduled for deletion in June 2013. |
com.google.common.base.Joiner.MapJoiner.appendTo(A, I)
use Joiner.MapJoiner.appendTo(Appendable, Iterator) by casting entries to
Iterator<? extends Entry<?, ?>> , or better yet, by implementing only
Iterator and not Iterable . This method is scheduled for deletion
in June 2013. |
com.google.common.base.Joiner.appendTo(StringBuilder, I)
use Joiner.appendTo(StringBuilder, Iterator) by casting parts to
Iterator<?> , or better yet, by implementing only Iterator and not
Iterable . This method is scheduled for deletion in June 2013. |
com.google.common.base.Joiner.MapJoiner.appendTo(StringBuilder, I)
use Joiner.MapJoiner.appendTo(StringBuilder, Iterator) by casting entries to
Iterator<? extends Entry<?, ?>> , or better yet, by implementing only
Iterator and not Iterable . This method is scheduled for deletion
in June 2013. |
com.google.common.cache.ForwardingCache.apply(K)
|
com.google.common.cache.AbstractCache.apply(K)
|
com.google.common.cache.Cache.apply(K)
This method has been split out into the LoadingCache interface, and will be
removed from Cache in Guava release 12.0. Note that
CacheBuilder.build(CacheLoader) now returns a LoadingCache , so this deprecation
(migration) can be dealt with by simply changing the type of references to the results of
CacheBuilder.build(CacheLoader) . |
com.google.common.util.concurrent.Futures.chain(ListenableFuture, Function super I, ? extends ListenableFuture extends O>>)
Convert your Function to a AsyncFunction , and
use Futures.transform(ListenableFuture, AsyncFunction) . This method is
scheduled to be removed from Guava in Guava release 12.0. |
com.google.common.util.concurrent.Futures.chain(ListenableFuture, Function super I, ? extends ListenableFuture extends O>>, Executor)
Convert your Function to a AsyncFunction , and
use Futures.transform(ListenableFuture, AsyncFunction, Executor) . This
method is scheduled to be removed from Guava in Guava release 12.0. |
com.google.common.collect.ArrayTable.clear()
Use ArrayTable.eraseAll() |
com.google.common.collect.SortedMaps.difference(SortedMap, Map extends K, ? extends V>)
Use Maps.difference(SortedMap, Map) |
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.Ordering.from(Ordering)
no need to use this |
com.google.common.net.InternetDomainName.fromLenient(String)
Use InternetDomainName.from(String) |
com.google.common.cache.ForwardingCache.get(K)
|
com.google.common.cache.Cache.get(K)
This method has been split out into the LoadingCache interface, and will be
removed from Cache in Guava release 12.0. Note that
CacheBuilder.build(CacheLoader) now returns a LoadingCache , so this deprecation
(migration) can be dealt with by simply changing the type of references to the results of
CacheBuilder.build(CacheLoader) . |
com.google.common.cache.ForwardingCache.getUnchecked(K)
|
com.google.common.cache.AbstractCache.getUnchecked(K)
|
com.google.common.cache.Cache.getUnchecked(K)
This method has been split out into the LoadingCache interface, and will be
removed from Cache in Guava release 12.0. Note that
CacheBuilder.build(CacheLoader) now returns a LoadingCache , so this deprecation
(migration) can be dealt with by simply changing the type of references to the results of
CacheBuilder.build(CacheLoader) . |
com.google.common.collect.Multimaps.index(I, Function super V, K>)
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.base.Joiner.join(I)
use Joiner.join(Iterator) by casting parts to
Iterator<?> , or better yet, by implementing only Iterator and not
Iterable . This method is scheduled for deletion in June 2013. |
com.google.common.base.Joiner.MapJoiner.join(I)
use Joiner.MapJoiner.join(Iterator) by casting entries to
Iterator<? extends Entry<?, ?>> , or better yet, by implementing only
Iterator and not Iterable . This method is scheduled for deletion
in June 2013. |
com.google.common.collect.GenericMapMaker.makeComputingMap(Function super K, ? extends V>)
|
com.google.common.collect.MapMaker.makeComputingMap(Function super K, ? extends V>)
Caching functionality in MapMaker is being moved to
CacheBuilder , with MapMaker.makeComputingMap(com.google.common.base.Function super K, ? extends V>) being replaced
by CacheBuilder.build(com.google.common.cache.CacheLoader super K1, V1>) . Note that uses of
MapMaker.makeComputingMap(com.google.common.base.Function super K, ? extends V>) with AtomicLong values can often be migrated to
AtomicLongMap .
This method is scheduled for deletion in February 2013. |
com.google.common.collect.ImmutableMultiset.of(E[])
use ImmutableMultiset.copyOf(Object[]) . This method is scheduled for
deletion in January 2012. |
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.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.SortedMaps.transformEntries(SortedMap, Maps.EntryTransformer super K, ? super V1, V2>)
Use Maps.transformEntries(SortedMap, EntryTransformer) |
com.google.common.collect.SortedMaps.transformValues(SortedMap, Function super V1, V2>)
Use Maps.transformValues(SortedMap, Function) |
com.google.common.collect.Maps.uniqueIndex(I, Function super V, K>)
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)) . |