Interface SnowflakeFriendlyId

All Superinterfaces:
IdGenerator, SnowflakeId, Statistical, StringIdGenerator
All Known Implementing Classes:
DefaultSnowflakeFriendlyId

public interface SnowflakeFriendlyId extends SnowflakeId
Snowflake ID with human-readable string representation.

Provides methods to convert Snowflake IDs to and from a friendly string format containing timestamp, machine ID, and sequence.

  • Method Details

    • getParser

      @NonNull SnowflakeIdStateParser getParser()
      Gets the state parser.
      Returns:
      the parser
    • friendlyId

      default @NonNull SnowflakeIdState friendlyId(long id)
      Parses a raw ID to friendly state.
      Parameters:
      id - the raw ID
      Returns:
      the friendly state
    • friendlyId

      default @NonNull SnowflakeIdState friendlyId()
      Generates an ID and returns its friendly state.
      Returns:
      the friendly state
    • ofFriendlyId

      default @NonNull SnowflakeIdState ofFriendlyId(String friendlyId)
      Parses a friendly ID string to state.
      Parameters:
      friendlyId - the friendly ID string
      Returns:
      the friendly state