public class Chooser<K,T>
extends Object
Chooser.
- 作者:
- alibaba
-
-
-
方法概要
boolean
int
Random get one item with weight.
void
-
构造器详细资料
-
Chooser
public Chooser(K uniqueKey)
-
-
方法详细资料
-
random
Random get one item.
- 返回:
- item
-
randomWithWeight
public T randomWithWeight()
Random get one item with weight.
- 返回:
- item
-
-
-
refresh
public void refresh(List<Pair<T>> itemsWithWeight)
refresh items.
- 参数:
itemsWithWeight - items with weight
-
-