@Test void testToLongString() { assertEquals(Long.valueOf(123L), toLong("123")); }
@Nullable @CheckForNull public static Long toLong(@Nullable @CheckForNull Object source) { if (source == null) { return null; } if (source instanceof Long) { return (Long) source; } return convert(source, Long.class); }
DataConverter { @Nullable @CheckForNull public static Long toLong(@Nullable @CheckForNull Object source) { if (source == null) { return null; } if (source instanceof Long) { return (Long) source; } return convert(source, Long.class); } }
DataConverter { @Nullable @CheckForNull public static Long toLong(@Nullable @CheckForNull Object source) { if (source == null) { return null; } if (source instanceof Long) { return (Long) source; } return convert(source, Long.class); } private  DataConverter(); }
DataConverter { @Nullable @CheckForNull public static Long toLong(@Nullable @CheckForNull Object source) { if (source == null) { return null; } if (source instanceof Long) { return (Long) source; } return convert(source, Long.class); } private  DataConverter(); static Object convert(Object source, Attribute attr); @Nullable @CheckForNull static String toString(@Nullable @CheckForNull Object source); @Nullable @CheckForNull static Integer toInt(@Nullable @CheckForNull Object source); @Nullable @CheckForNull static Long toLong(@Nullable @CheckForNull Object source); @SuppressWarnings("java:S2447") // null is a valid return value @Nullable @CheckForNull static Boolean toBoolean(@Nullable @CheckForNull Object source); @Nullable @CheckForNull static Double toDouble(@Nullable @CheckForNull Object source); @Nullable @CheckForNull static LocalDate toLocalDate(@Nullable @CheckForNull Object source); @Nullable @CheckForNull static Instant toInstant(@Nullable @CheckForNull Object source); static List<String> toList(@Nullable @CheckForNull Object source); static void setConversionService(ConversionService conversionService); }
DataConverter { @Nullable @CheckForNull public static Long toLong(@Nullable @CheckForNull Object source) { if (source == null) { return null; } if (source instanceof Long) { return (Long) source; } return convert(source, Long.class); } private  DataConverter(); static Object convert(Object source, Attribute attr); @Nullable @CheckForNull static String toString(@Nullable @CheckForNull Object source); @Nullable @CheckForNull static Integer toInt(@Nullable @CheckForNull Object source); @Nullable @CheckForNull static Long toLong(@Nullable @CheckForNull Object source); @SuppressWarnings("java:S2447") // null is a valid return value @Nullable @CheckForNull static Boolean toBoolean(@Nullable @CheckForNull Object source); @Nullable @CheckForNull static Double toDouble(@Nullable @CheckForNull Object source); @Nullable @CheckForNull static LocalDate toLocalDate(@Nullable @CheckForNull Object source); @Nullable @CheckForNull static Instant toInstant(@Nullable @CheckForNull Object source); static List<String> toList(@Nullable @CheckForNull Object source); static void setConversionService(ConversionService conversionService);  }