Package | Description |
---|---|
com.google.common.base |
Basic utility libraries and interfaces.
|
com.google.common.collect |
This package contains generic collection interfaces and implementations, and
other utilities for working with collections.
|
com.google.common.primitives |
Static utilities for working with the eight primitive types and
void ,
and value types for treating them as unsigned. |
Modifier and Type | Class and Description |
---|---|
private static class |
CaseFormat.StringConverter |
private static class |
Converter.ConverterComposition<A,B,C> |
private static class |
Converter.FunctionBasedConverter<A,B> |
private static class |
Converter.IdentityConverter<T>
A converter that always converts or reverses an object to itself.
|
private static class |
Converter.ReverseConverter<A,B> |
private static class |
Enums.StringConverter<T extends java.lang.Enum<T>> |
Modifier and Type | Field and Description |
---|---|
(package private) Converter<A,B> |
Converter.ConverterComposition.first |
(package private) Converter<A,B> |
Converter.ReverseConverter.original |
private Converter<B,A> |
Converter.reverse |
(package private) Converter<B,C> |
Converter.ConverterComposition.second |
Modifier and Type | Method and Description |
---|---|
<C> Converter<A,C> |
Converter.andThen(Converter<B,C> secondConverter)
Returns a converter whose
convert method applies secondConverter to the result
of this converter. |
Converter<java.lang.String,java.lang.String> |
CaseFormat.converterTo(CaseFormat targetFormat)
Returns a
Converter that converts strings from this format to targetFormat . |
(package private) <C> Converter<A,C> |
Converter.doAndThen(Converter<B,C> secondConverter)
Package-private non-final implementation of andThen() so only we can override it.
|
(package private) <S> Converter<T,S> |
Converter.IdentityConverter.doAndThen(Converter<T,S> otherConverter) |
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 existing 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<B,A> |
Converter.reverse()
Returns the reversed view of this converter, which converts
this.convert(a) back to a
value roughly equivalent to a . |
Converter<A,B> |
Converter.ReverseConverter.reverse() |
static <T extends java.lang.Enum<T>> |
Enums.stringConverter(java.lang.Class<T> enumClass)
Returns a converter that converts between strings and
enum values of type
enumClass using Enum.valueOf(Class, String) and Enum.name() . |
Modifier and Type | Method and Description |
---|---|
<C> Converter<A,C> |
Converter.andThen(Converter<B,C> secondConverter)
Returns a converter whose
convert method applies secondConverter to the result
of this converter. |
(package private) <C> Converter<A,C> |
Converter.doAndThen(Converter<B,C> secondConverter)
Package-private non-final implementation of andThen() so only we can override it.
|
(package private) <S> Converter<T,S> |
Converter.IdentityConverter.doAndThen(Converter<T,S> otherConverter) |
Constructor and Description |
---|
ConverterComposition(Converter<A,B> first,
Converter<B,C> second) |
ConverterComposition(Converter<A,B> first,
Converter<B,C> second) |
ReverseConverter(Converter<A,B> original) |
Modifier and Type | Class and Description |
---|---|
private static class |
Maps.BiMapConverter<A,B> |
Modifier and Type | Method and Description |
---|---|
static <A,B> Converter<A,B> |
Maps.asConverter(BiMap<A,B> bimap)
Returns a
Converter that converts values using bimap.get() ,
and whose inverse view converts values using
bimap.inverse() .get() . |
Modifier and Type | Class and Description |
---|---|
private static class |
Doubles.DoubleConverter |
private static class |
Floats.FloatConverter |
private static class |
Ints.IntConverter |
private static class |
Longs.LongConverter |
private static class |
Shorts.ShortConverter |
Modifier and Type | Method and Description |
---|---|
static Converter<java.lang.String,java.lang.Short> |
Shorts.stringConverter()
Returns a serializable converter object that converts between strings and
shorts using
Short.decode(java.lang.String) and Short.toString() . |
static Converter<java.lang.String,java.lang.Long> |
Longs.stringConverter()
Returns a serializable converter object that converts between strings and
longs using
Long.decode(java.lang.String) and Long.toString() . |
static Converter<java.lang.String,java.lang.Integer> |
Ints.stringConverter()
Returns a serializable converter object that converts between strings and
integers using
Integer.decode(java.lang.String) and Integer.toString() . |
static Converter<java.lang.String,java.lang.Float> |
Floats.stringConverter()
Returns a serializable converter object that converts between strings and
floats using
Float.valueOf(java.lang.String) and Float.toString() . |
static Converter<java.lang.String,java.lang.Double> |
Doubles.stringConverter()
Returns a serializable converter object that converts between strings and
doubles using
Double.valueOf(java.lang.String) and Double.toString() . |