Class Longs.LongConverter

java.lang.Object
com.google.common.base.Converter<String,Long>
com.google.common.primitives.Longs.LongConverter
All Implemented Interfaces:
Function<String,Long>, Serializable, Function<String,Long>
Enclosing class:
Longs

private static final class Longs.LongConverter extends Converter<String,Long> implements Serializable
  • Field Details

  • Constructor Details

    • LongConverter

      private LongConverter()
  • Method Details

    • doForward

      protected Long doForward(String value)
      Description copied from class: Converter
      Returns a representation of a as an instance of type B. If a cannot be converted, an unchecked exception (such as IllegalArgumentException) should be thrown.
      Specified by:
      doForward in class Converter<String,Long>
      Parameters:
      value - the instance to convert; will never be null
      Returns:
      the converted instance; must not be null
    • doBackward

      protected String doBackward(Long value)
      Description copied from class: Converter
      Returns a representation of b as an instance of type A. If b cannot be converted, an unchecked exception (such as IllegalArgumentException) should be thrown.
      Specified by:
      doBackward in class Converter<String,Long>
      Parameters:
      value - the instance to convert; will never be null
      Returns:
      the converted instance; must not be null
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • readResolve

      private Object readResolve()