Interface Hash32<T>

Type Parameters:
T - 被计算hash的对象类型
All Superinterfaces:
Encoder<T,Number>
All Known Implementing Classes:
CityHash, KetamaHash, MurmurHash
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface Hash32<T> extends Encoder<T,Number>
Hash计算接口
Since:
Java 17+
Author:
Kimi Liu
  • Method Summary

    Modifier and Type
    Method
    Description
    default Number
    encode(T t)
    执行编码
    int
    hash32(T t)
    计算Hash值
  • Method Details

    • hash32

      int hash32(T t)
      计算Hash值
      Parameters:
      t - 对象
      Returns:
      hash
    • encode

      default Number encode(T t)
      Description copied from interface: Encoder
      执行编码
      Specified by:
      encode in interface Encoder<T,Number>
      Parameters:
      t - 被编码的数据
      Returns:
      编码后的数据