Package me.ahoo.cosid

Interface IdConverter

All Superinterfaces:
Statistical
All Known Implementing Classes:
DatePrefixIdConverter, GroupedPrefixIdConverter, PrefixIdConverter, Radix36IdConverter, Radix62IdConverter, RadixIdConverter, SnowflakeFriendlyIdConverter, SuffixIdConverter, ToStringIdConverter

@ThreadSafe public interface IdConverter extends Statistical
ID converter.
  • Method Summary

    Modifier and Type
    Method
    Description
    long
    asLong(String idString)
    convert String type ID to long.
    asString(long id)
    convert long type ID to String.
    default Stat
     
  • Method Details

    • asString

      @Nonnull String asString(long id)
      convert long type ID to String.
      Parameters:
      id - long type ID
      Returns:
      String type ID
    • asLong

      long asLong(@Nonnull String idString)
      convert String type ID to long.
      Parameters:
      idString - String type ID
      Returns:
      long type ID
    • stat

      default Stat stat()
      Specified by:
      stat in interface Statistical