public static enum SafetySetting.SafeThresholdType extends Enum<SafetySetting.SafeThresholdType>
| 枚举常量和说明 |
|---|
BLOCK_LOW_AND_ABOVE
在存在不安全内容的几率较低、中等或较高时屏蔽
|
BLOCK_MEDIUM_AND_ABOVE
出现中等或高概率的不安全内容时屏蔽
|
BLOCK_NONE
始终显示(无论是否存在不安全内容的概率)
|
BLOCK_ONLY_HIGH
在存在高风险的不安全内容时屏蔽
|
HARM_BLOCK_THRESHOLD_UNSPECIFIED
未指定阈值,使用默认阈值进行屏蔽
|
| 限定符和类型 | 方法和说明 |
|---|---|
static SafetySetting.SafeThresholdType |
valueOf(String name)
返回带有指定名称的该类型的枚举常量。
|
static SafetySetting.SafeThresholdType[] |
values()
按照声明该枚举类型的常量的顺序, 返回
包含这些常量的数组。
|
public static final SafetySetting.SafeThresholdType BLOCK_NONE
public static final SafetySetting.SafeThresholdType BLOCK_ONLY_HIGH
public static final SafetySetting.SafeThresholdType BLOCK_MEDIUM_AND_ABOVE
public static final SafetySetting.SafeThresholdType BLOCK_LOW_AND_ABOVE
public static final SafetySetting.SafeThresholdType HARM_BLOCK_THRESHOLD_UNSPECIFIED
public static SafetySetting.SafeThresholdType[] values()
for (SafetySetting.SafeThresholdType c : SafetySetting.SafeThresholdType.values()) System.out.println(c);
public static SafetySetting.SafeThresholdType valueOf(String name)
name - 要返回的枚举常量的名称。IllegalArgumentException - 如果该枚举类型没有带有指定名称的常量NullPointerException - 如果参数为空值Copyright © 2023. All rights reserved.