Package com.google.common.primitives
Class Shorts.ShortConverter
- java.lang.Object
-
- com.google.common.base.Converter<java.lang.String,java.lang.Short>
-
- com.google.common.primitives.Shorts.ShortConverter
-
-
Field Summary
Fields Modifier and Type Field Description (package private) static Shorts.ShortConverter
INSTANCE
private static long
serialVersionUID
-
Constructor Summary
Constructors Modifier Constructor Description private
ShortConverter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.lang.String
doBackward(java.lang.Short value)
Returns a representation ofb
as an instance of typeA
.protected java.lang.Short
doForward(java.lang.String value)
Returns a representation ofa
as an instance of typeB
.private java.lang.Object
readResolve()
java.lang.String
toString()
-
-
-
Field Detail
-
INSTANCE
static final Shorts.ShortConverter INSTANCE
-
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
-
-
Method Detail
-
doForward
protected java.lang.Short doForward(java.lang.String value)
Description copied from class:Converter
Returns a representation ofa
as an instance of typeB
. Ifa
cannot be converted, an unchecked exception (such asIllegalArgumentException
) should be thrown.
-
doBackward
protected java.lang.String doBackward(java.lang.Short value)
Description copied from class:Converter
Returns a representation ofb
as an instance of typeA
. Ifb
cannot be converted, an unchecked exception (such asIllegalArgumentException
) should be thrown.- Specified by:
doBackward
in classConverter<java.lang.String,java.lang.Short>
- Parameters:
value
- the instance to convert; will never be null- Returns:
- the converted instance; must not be null
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
readResolve
private java.lang.Object readResolve()
-
-