本文整理汇总了Java中org.apache.commons.collections4.MapUtils.getString方法的典型用法代码示例。如果您正苦于以下问题:Java MapUtils.getString方法的具体用法?Java MapUtils.getString怎么用?Java MapUtils.getString使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.apache.commons.collections4.MapUtils
的用法示例。
在下文中一共展示了MapUtils.getString方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: process
import org.apache.commons.collections4.MapUtils; //导入方法依赖的package包/类
@Override
public void process(Map<String, ? extends Object> _value) {
this.type = MapUtils.getString(_value, "_type", null);
this.forEndUserDisplay = MapUtils.getBoolean(_value, "forenduserdisplay", false);
this.careerType = MapUtils.getString(_value, "careertype", null);
this.status = MapUtils.getString(_value, "status", null);
}
示例2: inspect
import org.apache.commons.collections4.MapUtils; //导入方法依赖的package包/类
@Override
public boolean inspect(Map<InspectParamEnum, Object> paramMap) {
String host = MapUtils.getString(paramMap, InspectParamEnum.SPLIT_KEY);
List<InstanceInfo> list = (List<InstanceInfo>) paramMap.get(InspectParamEnum.INSTANCE_LIST);
for (InstanceInfo info : list) {
final int port = info.getPort();
final int type = info.getType();
long appId = info.getAppId();
if (TypeUtil.isRedisType(type)) {
boolean isRun;
if (TypeUtil.isRedisSentinel(type)) {
isRun = redisCenter.isRun(host, port);
} else {
isRun = redisCenter.isRun(appId, host, port);
}
Boolean isUpdate = updateInstanceByRun(isRun, info);
if (isUpdate == null) {
continue;
} else if (isUpdate) {
redisCenter.deployRedisCollection(appId, host, port);
redisCenter.deployRedisSlowLogCollection(appId, host, port);
} else {
redisCenter.unDeployRedisCollection(appId, host, port);
redisCenter.unDeployRedisSlowLogCollection(appId, host, port);
}
// 错误
if (isUpdate != null) {
alertInstanceInfo(info);
}
}
}
return true;
}
示例3: process
import org.apache.commons.collections4.MapUtils; //导入方法依赖的package包/类
@Override
public void process(Map<String, ? extends Object> _value) {
this.type = MapUtils.getString(_value, "_type", MapUtils.getString(_value, "type", null));
this.forEndUserDisplay = MapUtils.getBoolean(_value, "forenduserdisplay", MapUtils.getBoolean(_value, "forEndUserDisplay", false));
this.relevance = MapUtils.getDouble(_value, "relevance", 0.0);
this.name = MapUtils.getString(_value, "name", null);
this.name = ((name.length() > 50)?StringUtils.substringBeforeLast(StringUtils.left(name, 50), "_"):this.name);
}
示例4: process
import org.apache.commons.collections4.MapUtils; //导入方法依赖的package包/类
@Override
public void process(Map<String, ? extends Object> _value) {
this.forEndUserDisplay = MapUtils.getBoolean(_value, "forenduserdisplay", false);
this.score = MapUtils.getDoubleValue(_value, "score", 0.0);
this.name = MapUtils.getString(_value, "name", null);
this.name = ((name.length() > 50)?StringUtils.substringBeforeLast(StringUtils.left(name, 50), "_"):this.name);
}
示例5: process
import org.apache.commons.collections4.MapUtils; //导入方法依赖的package包/类
@Override
public void process(Map<String, ? extends Object> _value) {
this.forEndUserDisplay = MapUtils.getBoolean(_value, "forenduserdisplay", false);
this.importance = MapUtils.getIntValue(_value, "importance", 0);
this.name = MapUtils.getString(_value, "name", null);
this.name = ((name.length() > 50)?StringUtils.substringBeforeLast(StringUtils.left(name, 50), "_"):this.name);
}
示例6: main
import org.apache.commons.collections4.MapUtils; //导入方法依赖的package包/类
public static void main(String... args) {
Map<String, String> map = Maps.newHashMap();
System.out.println(MapUtils.isEmpty(map));
MapUtils.getString(map,"","");
//MapUtils.getString(map,"","")
}