• 集合


    List<Long> taskIdList = FluentIterable.from(Arrays.asList(strTaskIdArr))
    .transform(new Function<String, Long>() {
    @Nullable
    @Override
    public Long apply(@Nullable String taskIdStr) {
    return Strings.isNullOrEmpty(taskIdStr) ? -1 : Long.parseLong(taskIdStr);
    }
    }).toList();

    Iterable levelPermissions = Splitter.on(",").trimResults().omitEmptyStrings()
    .split(propertiesHelper.getProperty(permissionsLevel, ""));
    return ImmutableSet.copyOf(levelPermissions);


    public static final Set<String> normalUsers = initRoles("level_2_permissions");

    private static Set<String> initRoles(String permissionsLevel){
    try {
    PropertiesHelper propertiesHelper = new PropertiesHelper(
    Constants.CENTER_DEPARTMENT_CONFIG_FILE_PATH);
    Iterable levelPermissions = Splitter.on(",").trimResults().omitEmptyStrings()
    .split(propertiesHelper.getProperty(permissionsLevel, ""));
    return ImmutableSet.copyOf(levelPermissions);
    } catch (Exception e) {
    dMsg.error(e.getMessage(), e);
    }
    return new HashSet<>();
    }

  • 相关阅读:
    注册表开启或关闭ie浏览器-局域网设置-自动监测设置
    关于win32接口文档位置
    网站添加天气预报插件
    json
    re正则
    配置文件
    logging日志模块
    hashlib加密
    sys模块
    os模块
  • 原文地址:https://www.cnblogs.com/hyp5490-/p/6376592.html
Copyright © 2020-2023  润新知