Package com.google.common.primitives
Class Longs.LongConverter
- java.lang.Object
-
- com.google.common.base.Converter<java.lang.String,java.lang.Long>
-
- com.google.common.primitives.Longs.LongConverter
-
- All Implemented Interfaces:
Function<java.lang.String,java.lang.Long>,java.io.Serializable,java.util.function.Function<java.lang.String,java.lang.Long>
- Enclosing class:
- Longs
private static final class Longs.LongConverter extends Converter<java.lang.String,java.lang.Long> implements java.io.Serializable
-
-
Field Summary
Fields Modifier and Type Field Description (package private) static Longs.LongConverterINSTANCEprivate static longserialVersionUID
-
Constructor Summary
Constructors Modifier Constructor Description privateLongConverter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.lang.StringdoBackward(java.lang.Long value)Returns a representation ofbas an instance of typeA.protected java.lang.LongdoForward(java.lang.String value)Returns a representation ofaas an instance of typeB.private java.lang.ObjectreadResolve()java.lang.StringtoString()-
Methods inherited from class com.google.common.base.Converter
andThen, apply, convert, convertAll, equals, from, identity, reverse
-
-
-
-
Field Detail
-
INSTANCE
static final Longs.LongConverter INSTANCE
-
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
-
-
Method Detail
-
doForward
protected java.lang.Long doForward(java.lang.String value)
Description copied from class:ConverterReturns a representation ofaas an instance of typeB. Ifacannot be converted, an unchecked exception (such asIllegalArgumentException) should be thrown.
-
doBackward
protected java.lang.String doBackward(java.lang.Long value)
Description copied from class:ConverterReturns a representation ofbas an instance of typeA. Ifbcannot be converted, an unchecked exception (such asIllegalArgumentException) should be thrown.- Specified by:
doBackwardin classConverter<java.lang.String,java.lang.Long>- 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:
toStringin classjava.lang.Object
-
readResolve
private java.lang.Object readResolve()
-
-