public class Chooser<K,T> extends Object
Modifier and Type | Class and Description |
---|---|
class |
Chooser.Ref<T> |
Constructor and Description |
---|
Chooser(K uniqueKey) |
Chooser(K uniqueKey,
List<Pair<T>> pairs) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object other) |
Chooser.Ref<T> |
getRef() |
K |
getUniqueKey() |
int |
hashCode() |
T |
random() |
T |
randomWithWeight() |
void |
refresh(List<Pair<T>> itemsWithWeight) |
Copyright © 2018 Alibaba Group. All rights reserved.