use of com.tencent.wstt.gt.InPara in project GT by Tencent.
the class DefaultInParaManager method clear.
@Override
public void clear() {
synchronized (inParaMap) {
List<InPara> tmpList = getAll();
inParaMap.clear();
sortedInParas.clear();
sortedInParaList.clear();
for (InPara para : tmpList) {
IpUIManager.list_ip.remove(para);
}
}
}
use of com.tencent.wstt.gt.InPara in project GT by Tencent.
the class DefaultInParaManager method getInPara.
@Override
public double getInPara(String paraName, double origVal) {
InPara iv = inParaMap.get(paraName);
double value = origVal;
if (null != iv) {
List<String> vals = iv.getValues();
String val = vals.get(0);
if (matchInParaType(val, "double")) {
value = Double.parseDouble(val);
}
}
return value;
}
use of com.tencent.wstt.gt.InPara in project GT by Tencent.
the class DefaultInParaManager method getInPara.
@Override
public boolean getInPara(String paraName, boolean origVal) {
InPara iv = inParaMap.get(paraName);
boolean value = origVal;
if (null != iv) {
List<String> vals = iv.getValues();
String val = vals.get(0);
if (matchInParaType(val, "boolean")) {
value = Boolean.parseBoolean(val);
}
}
return value;
}
use of com.tencent.wstt.gt.InPara in project GT by Tencent.
the class IpUIManager method getACInputParams.
public static List<InPara> getACInputParams() {
List<InPara> show_iv = new ArrayList<InPara>();
for (int i = 1; i < list_ip.size(); i++) {
InPara ip = list_ip.get(i);
if (ip.getKey().equals(ParamConst.DIVID_TITLE)) {
break;
}
show_iv.add(list_ip.get(i));
}
return show_iv;
}
use of com.tencent.wstt.gt.InPara in project GT by Tencent.
the class ConnectedState method getInPara.
/**
* 下面这些对应的用户接口
* @Override
*/
public String getInPara(String paraName, String origVal, boolean isGlobal) {
// connected态的这个方法需要直接调aidl接口
InPara iv = getInPara(paraName, isGlobal);
String result = origVal;
if (null != iv) {
if (InPara.DISPLAY_DISABLE == iv.getDisplayProperty()) {
result = origVal;
} else {
List<String> vals = iv.getValues();
String val = vals.get(0);
if (val.equals("<null>")) {
result = null;
} else {
result = val;
}
}
}
return result;
}