Deprecated API


Contents
Deprecated Classes
com.google.common.collect.SortedMaps
          Use the identical methods in Maps. This class is scheduled for deletion from Guava in Guava release 12.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.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>)
          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>, 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)
          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)
          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)
           
com.google.common.collect.MapMaker.makeComputingMap(Function)
          Caching functionality in MapMaker is being moved to CacheBuilder, with MapMaker.makeComputingMap(com.google.common.base.Function) being replaced by CacheBuilder.build(com.google.common.cache.CacheLoader). Note that uses of MapMaker.makeComputingMap(com.google.common.base.Function) 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)
          Use Maps.transformEntries(SortedMap, EntryTransformer) 
com.google.common.collect.SortedMaps.transformValues(SortedMap, Function)
          Use Maps.transformValues(SortedMap, Function) 
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)). 
 



Copyright © 2010-2012. All Rights Reserved.