SortedSet有序集合的特点
![](https://img2022.cnblogs.com/blog/2648122/202201/2648122-20220124094141407-1401165808.png)
增
![](https://img2022.cnblogs.com/blog/2648122/202201/2648122-20220124094141353-1008452389.png)
删
![](https://img2022.cnblogs.com/blog/2648122/202201/2648122-20220124094141340-1442917857.png)
改
没有相关命令
先删除,再添加
查
![](https://img2022.cnblogs.com/blog/2648122/202201/2648122-20220124094141282-706428147.png)
分值的增加和减少
![](https://img2022.cnblogs.com/blog/2648122/202201/2648122-20220124094141462-282082782.png)
返回元素的索引
![](https://img2022.cnblogs.com/blog/2648122/202201/2648122-20220124094141317-99841603.png)
返回元素的逆序排名
![](https://img2022.cnblogs.com/blog/2648122/202201/2648122-20220124094141433-58978748.png)
返回指定索引区间元素
![](https://img2022.cnblogs.com/blog/2648122/202201/2648122-20220124094141435-1898278040.png)
逆序返回指定索引区间元素(降序)
![](https://img2022.cnblogs.com/blog/2648122/202201/2648122-20220124094141359-644723886.png)
返回指定分值区间元素(升序)
![](https://img2022.cnblogs.com/blog/2648122/202201/2648122-20220124094141434-189382281.png)
返回指定分值区间元素 (降序)
![](https://img2022.cnblogs.com/blog/2648122/202201/2648122-20220124094141338-1770113347.png)
移除指定排名(索引)范围的元素
![](https://img2022.cnblogs.com/blog/2648122/202201/2648122-20220124094141348-1753745631.png)
移除指定分值范围的元素
![](https://img2022.cnblogs.com/blog/2648122/202201/2648122-20220124094141321-266574649.png)
返回集合中元素个数、返回指定分值范围中元素的个数
![](https://img2022.cnblogs.com/blog/2648122/202201/2648122-20220124094141408-1229905329.png)
并集
![](https://img2022.cnblogs.com/blog/2648122/202201/2648122-20220124101819792-1683358674.png)
交集
![](https://img2022.cnblogs.com/blog/2648122/202201/2648122-20220124101819793-1742269756.png)
SortedSet有序集合的使用场景
案例一
![](https://img2022.cnblogs.com/blog/2648122/202201/2648122-20220124101819736-1749259931.png)
案例二
![](https://img2022.cnblogs.com/blog/2648122/202201/2648122-20220124101819723-1058741846.png)
案例三
![](https://img2022.cnblogs.com/blog/2648122/202201/2648122-20220124101819723-1210051000.png)
posted @
2022-01-24 09:42
赤兔胭脂小吕布
阅读(
18)
评论()
编辑
收藏
举报