public class FunctionWeightedSelection extends AbstractModel
header, skipSign
Constructor and Description |
---|
FunctionWeightedSelection() |
FunctionWeightedSelection(FunctionWeightedSelection source)
NOTE: Any ambiguous key set via .set("AnyKey", "value") will be a shallow copy,
and any explicit key, i.e Foo, set via .setFoo("value") will be a deep copy.
|
Modifier and Type | Method and Description |
---|---|
String |
getFunctionId()
Get 函数 ID 。
|
Long |
getWeight()
Get 选中权重。取值范围0-100,所有的权重之和需要为100。
选中概率计算方式为:
weight/100。例如设置了两个函数 A 和 B ,其中 A 的权重为30,那么 B 的权重必须为70,最终选中 A 的概率为30%,选中 B 的概率为70%。
|
void |
setFunctionId(String FunctionId)
Set 函数 ID 。
|
void |
setWeight(Long Weight)
Set 选中权重。取值范围0-100,所有的权重之和需要为100。
选中概率计算方式为:
weight/100。例如设置了两个函数 A 和 B ,其中 A 的权重为30,那么 B 的权重必须为70,最终选中 A 的概率为30%,选中 B 的概率为70%。
|
void |
toMap(HashMap<String,String> map,
String prefix)
Internal implementation, normal users should not use it.
|
any, fromJsonString, getBinaryParams, GetHeader, getMultipartRequestParams, getSkipSign, isStream, set, SetHeader, setParamArrayObj, setParamArraySimple, setParamObj, setParamSimple, setSkipSign, toJsonString
public FunctionWeightedSelection()
public FunctionWeightedSelection(FunctionWeightedSelection source)
public String getFunctionId()
public void setFunctionId(String FunctionId)
FunctionId
- 函数 ID 。public Long getWeight()
public void setWeight(Long Weight)
Weight
- 选中权重。取值范围0-100,所有的权重之和需要为100。
选中概率计算方式为:
weight/100。例如设置了两个函数 A 和 B ,其中 A 的权重为30,那么 B 的权重必须为70,最终选中 A 的概率为30%,选中 B 的概率为70%。Copyright © 2025. All rights reserved.