Package | Description |
---|---|
com.lc.lang | |
com.lc.utils |
Modifier and Type | Method and Description |
---|---|
WeightRandom<T> |
WeightRandom.add(T obj,
double weight)
增加对象
|
WeightRandom<T> |
WeightRandom.add(WeightRandom.WeightObj<T> weightObj)
增加对象权重
|
WeightRandom<T> |
WeightRandom.clear()
清空权重表
|
static <T> WeightRandom<T> |
WeightRandom.create()
创建权重随机获取器
WeightRandom |
Modifier and Type | Method and Description |
---|---|
static <T> WeightRandom<T> |
URandomUtil.weightRandom(Iterable<WeightRandom.WeightObj<T>> weightObjs)
带有权重的随机生成器
WeightRandom |
static <T> WeightRandom<T> |
URandomUtil.weightRandom(WeightRandom.WeightObj<T>[] weightObjs)
带有权重的随机生成器
WeightRandom |
Copyright © 2020. All rights reserved.