Uses of Class
com.google.common.base.Converter
Packages that use Converter
Package
Description
Basic utility libraries and interfaces.
Collection interfaces and implementations, and other utilities for collections.
Static utilities for the eight primitive types and
void
, and value types for treating
them as unsigned or storing them in immutable arrays.Testing utilities.
-
Uses of Converter in com.google.common.base
Subclasses of Converter in com.google.common.baseModifier and TypeClassDescriptionprivate static final class
private static final class
private static final class
private static final class
A converter that always converts or reverses an object to itself.private static final class
private static final class
Enums.StringConverter<T extends Enum<T>>
Fields in com.google.common.base declared as ConverterModifier and TypeFieldDescriptionConverter.ConverterComposition.first
(package private) static final Converter
<?, ?> Converter.IdentityConverter.INSTANCE
Converter.ReverseConverter.original
Converter.reverse
Converter.ConverterComposition.second
Methods in com.google.common.base that return ConverterModifier and TypeMethodDescriptionReturns a converter whoseconvert
method appliessecondConverter
to the result of this converter.CaseFormat.converterTo
(CaseFormat targetFormat) Returns a serializableConverter
that converts strings from this format totargetFormat
.Package-private non-final implementation of andThen() so only we can override it.static <A,
B> Converter <A, B> Converter.from
(Function<? super A, ? extends B> forwardFunction, Function<? super B, ? extends A> backwardFunction) Returns a converter based on separate forward and backward functions.static <T> Converter
<T, T> Converter.identity()
Returns a serializable converter that always converts or reverses an object to itself.Converter.reverse()
Returns the reversed view of this converter, which convertsthis.convert(a)
back to a value roughly equivalent toa
.Converter.ReverseConverter.reverse()
Enums.stringConverter
(Class<T> enumClass) Returns a serializable converter that converts between strings andenum
values of typeenumClass
usingEnum.valueOf(Class, String)
andEnum.name()
.Methods in com.google.common.base with parameters of type ConverterModifier and TypeMethodDescriptionReturns a converter whoseconvert
method appliessecondConverter
to the result of this converter.Package-private non-final implementation of andThen() so only we can override it.Constructors in com.google.common.base with parameters of type Converter -
Uses of Converter in com.google.common.collect
Subclasses of Converter in com.google.common.collectMethods in com.google.common.collect that return ConverterModifier and TypeMethodDescriptionstatic <A,
B> Converter <A, B> Maps.asConverter
(BiMap<A, B> bimap) Returns aConverter
that converts values usingbimap.get()
, and whose inverse view converts values usingbimap.inverse()
.get()
. -
Uses of Converter in com.google.common.primitives
Subclasses of Converter in com.google.common.primitivesModifier and TypeClassDescriptionprivate static final class
private static final class
private static final class
private static final class
private static final class
Fields in com.google.common.primitives declared as ConverterModifier and TypeFieldDescriptionDoubles.DoubleConverter.INSTANCE
Floats.FloatConverter.INSTANCE
Ints.IntConverter.INSTANCE
Longs.LongConverter.INSTANCE
Shorts.ShortConverter.INSTANCE
Methods in com.google.common.primitives that return ConverterModifier and TypeMethodDescriptionDoubles.stringConverter()
Returns a serializable converter object that converts between strings and doubles usingDouble.valueOf(java.lang.String)
andDouble.toString()
.Floats.stringConverter()
Returns a serializable converter object that converts between strings and floats usingFloat.valueOf(java.lang.String)
andFloat.toString()
.Ints.stringConverter()
Returns a serializable converter object that converts between strings and integers usingInteger.decode(java.lang.String)
andInteger.toString()
.Longs.stringConverter()
Returns a serializable converter object that converts between strings and longs usingLong.decode(java.lang.String)
andLong.toString()
.Shorts.stringConverter()
Returns a serializable converter object that converts between strings and shorts usingShort.decode(java.lang.String)
andShort.toString()
. -
Uses of Converter in com.google.common.testing
Methods in com.google.common.testing that return ConverterModifier and TypeMethodDescriptionprivate <F,
T> Converter <F, T> NullPointerTester.defaultConverter
(TypeToken<F> convertFromType, TypeToken<T> convertToType)