当前位置: 首页>>代码示例>>Java>>正文


Java MapUtils.getString方法代码示例

本文整理汇总了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);
}
 
开发者ID:balarj,项目名称:rmend-commons,代码行数:8,代码来源:RelationsBean.java

示例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;
}
 
开发者ID:sohutv,项目名称:cachecloud,代码行数:36,代码来源:InstanceRunInspector.java

示例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);
}
 
开发者ID:balarj,项目名称:rmend-commons,代码行数:9,代码来源:EntitiesBean.java

示例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);
}
 
开发者ID:balarj,项目名称:rmend-commons,代码行数:8,代码来源:TopicBean.java

示例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);
}
 
开发者ID:balarj,项目名称:rmend-commons,代码行数:8,代码来源:SocialTagBean.java

示例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,"","")
}
 
开发者ID:xianrendzw,项目名称:CodeMaster,代码行数:7,代码来源:CollectionUtilsTest.java


注:本文中的org.apache.commons.collections4.MapUtils.getString方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。