LexoRank class

LexoRank 高效排序算法实现 支持千万级别数据量,生成不重复的排序字符串

Constructors

LexoRank()

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

after(String rank) String
生成一个比指定排序字符串更大的排序字符串 rank 参考排序字符串
before(String rank) String
生成一个比指定排序字符串更小的排序字符串 rank 参考排序字符串
between(String prev, String next) String
在两个排序字符串之间生成一个新的排序字符串 prev 前一个排序字符串 next 后一个排序字符串
compare(String rank1, String rank2) int
比较两个排序字符串的大小 返回负数表示rank1 < rank2,0表示相等,正数表示rank1 > rank2
generateDecreasingRanks(LexoDataScale scale, {String? end}) List<String>
生成指定数量的往前递减排序字符串列表 scale 数据量级配置 end 结束位置的排序字符串,如果不传入则根据scale自动计算起始位置
initial() String
获取初始排序字符串(用于第一个元素)
isValid(String rank) bool
验证排序字符串是否有效