Deprecated API
Contents
-
Deprecated InterfacesInterfaceDescriptionUsefor basic checks. In place of constrained maps, we encourage you to check your preconditions explicitly instead of leaving that work to the map implementation. For the specific case of rejecting null, consider
invalid reference
PreconditionsImmutableMap. This class is scheduled for removal in Guava 21.0.
-
Deprecated ClassesClassDescriptionUse
MoreObjects.ToStringHelperinstead. This class is scheduled for removal in Guava 21.0.Usefor basic checks. In place of constrained maps, we encourage you to check your preconditions explicitly instead of leaving that work to the map implementation. For the specific case of rejecting null, considerinvalid reference
PreconditionsImmutableMap. This class is scheduled for removal in Guava 21.0.
-
Deprecated FieldsFieldDescriptionUse
CharMatcher.any()instead. This constant is scheduled to be removed in June 2018.UseCharMatcher.ascii()instead. This constant is scheduled to be removed in June 2018.UseCharMatcher.breakingWhitespace()instead. This constant is scheduled to be removed in June 2018.UseCharMatcher.digit()instead. This constant is scheduled to be removed in June 2018.UseCharMatcher.invisible()instead. This constant is scheduled to be removed in June 2018.UseCharMatcher.javaDigit()instead. This constant is scheduled to be removed in June 2018.UseCharMatcher.javaIsoControl()instead. This constant is scheduled to be removed in June 2018.UseCharMatcher.javaLetter()instead. This constant is scheduled to be removed in June 2018.UseCharMatcher.javaLetterOrDigit()instead. This constant is scheduled to be removed in June 2018.UseCharMatcher.javaLowerCase()instead. This constant is scheduled to be removed in June 2018.UseCharMatcher.javaUpperCase()instead. This constant is scheduled to be removed in June 2018.UseCharMatcher.none()instead. This constant is scheduled to be removed in June 2018.UseCharMatcher.singleWidth()instead. This constant is scheduled to be removed in June 2018.UseCharMatcher.whitespace()instead. This constant is scheduled to be removed in June 2018.
-
Deprecated MethodsMethodDescriptionProvided only to satisfy the
Predicateinterface; useCharMatcher.matches(char)instead.Provided to satisfy theFunctioninterface; useConverter.convert(A)instead.UseMoreObjects.firstNonNull(T, T)instead. This method is scheduled for removal in Guava 21.0.UseMoreObjects.toStringHelper(Class)instead. This method is scheduled for removal in Guava 21.0.UseMoreObjects.toStringHelper(Object)instead. This method is scheduled for removal in Guava 21.0.UseMoreObjects.toStringHelper(String)instead. This method is scheduled for removal in Guava 21.0.Use the correctly-named methodPredicates.subtypeOf(java.lang.Class<?>)instead.Usethrow eorthrow new RuntimeException(e)directly, or use a combination ofThrowables.throwIfUnchecked(java.lang.Throwable)andthrow new RuntimeException(e). This method is scheduled to be removed in July 2018.UseThrowables.throwIfInstanceOf(java.lang.Throwable, java.lang.Class<X>), which has the same behavior but rejectsnull. This method is scheduled to be removed in July 2018.UseThrowables.throwIfUnchecked(java.lang.Throwable), which has the same behavior but rejectsnull. This method is scheduled to be removed in July 2018.Provided to satisfy theFunctioninterface; useLoadingCache.get(K)orLoadingCache.getUnchecked(K)instead.UseComparisonChain.compareFalseFirst(boolean, boolean); or, if the parameters passed are being either negated or reversed, undo the negation or reversal and useComparisonChain.compareTrueFirst(boolean, boolean).UseConcurrentHashMultiset.create(ConcurrentMap)instead. This method is scheduled for deletion in Guava 21.0.instances ofFluentIterabledon't need to be converted toFluentIterableUseinstead (but note the differences in mutability). This method will be removed in Guava release 21.0.invalid reference
#from(E[])Unsupported operation.Unsupported operation.Unsupported operation.Unsupported operation.Unsupported operation.Unsupported operation.Unsupported operation.Unsupported operation.Unsupported operation.Unsupported operation.Unsupported operation.Unsupported operation.Unsupported operation.Unsupported operation.Unsupported operation.Unsupported operation.Unsupported operation.Unsupported operation.Unsupported operation.Unsupported operation.Unsupported operation.Unsupported operation.Unsupported operation.Unsupported operation.Unsupported operation.Unsupported operation.Unsupported operation.Unsupported operation.Unsupported operation.Unsupported operation.Unsupported operation.Unsupported operation.Unsupported operation.Unsupported operation.Unsupported operation.Unsupported operation.Unsupported operation.Unsupported operation.Unsupported operation.Unsupported by ImmutableSortedMap.Builder.Unsupported operation.Unsupported operation.Unsupported operation.Unsupported operation.Unsupported operation.Unsupported operation.Unsupported operation.Unsupported operation.Unsupported operation.Unsupported operation.no need to use thisno need to use thisno need to use thisno need to use thisno need to use thisno need to use thisno need to use thisUseCollections.binarySearch(List, Object, Comparator)directly. This method is scheduled for deletion in June 2018.no need to use thisProvided only to satisfy thePredicateinterface; useRange.contains(C)instead.UseCollections.newSetFromMap(java.util.Map<E, java.lang.Boolean>)instead. This method will be removed in December 2017.Unsupported operation.Unsupported operation.Unsupported operation.no need to use thisno need to use thisno need to use thisProvided only to satisfy thePredicateinterface; useBloomFilter.mightContain(T)instead.This returnsObject.hashCode(); you almost certainly mean to callhash().asInt().This method is dangerous as it discards the high byte of every character. For UTF-8, usewrite(s.getBytes(StandardCharsets.UTF_8)).The semantics ofwriteBytes(String s)are considered dangerous. Please useLittleEndianDataOutputStream.writeUTF(String s),LittleEndianDataOutputStream.writeChars(String s)or another write method instead.UseStats.meanOf(java.lang.Iterable<? extends java.lang.Number>)instead, noting the less strict handling of non-finite values. This method will be removed in February 2018.UseStats.meanOf(java.lang.Iterable<? extends java.lang.Number>)instead, noting the less strict handling of non-finite values. This method will be removed in February 2018.UseStats.meanOf(java.lang.Iterable<? extends java.lang.Number>)instead, noting the less strict handling of non-finite values. This method will be removed in February 2018.UseStats.meanOf(java.lang.Iterable<? extends java.lang.Number>)instead, noting the less strict handling of non-finite values. This method will be removed in February 2018.UseStats.meanOf(java.lang.Iterable<? extends java.lang.Number>)instead, noting the less strict handling of non-finite values. This method will be removed in February 2018.UseHostAndPort.getHost()instead. This method is scheduled for removal in Guava 22.0.unsupported operationunsupported operationunsupported operationunsupported operationunsupported operationunsupported operationUseMoreExecutors.directExecutor()if you only require anExecutorandMoreExecutors.newDirectExecutorService()if you need aListeningExecutorService. This method will be removed in Guava 21.0.