gpt4 book ai didi

com.argo.yaml.YamlMap类的使用及代码示例

转载 作者:知者 更新时间:2024-03-20 13:42:31 28 4
gpt4 key购买 nike

本文整理了Java中com.argo.yaml.YamlMap类的一些代码示例,展示了YamlMap类的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。YamlMap类的具体详情如下:
包路径:com.argo.yaml.YamlMap
类名称:YamlMap

YamlMap介绍

[英]Created by yamingd on 9/9/15.
[中]由亚明德于2015年9月9日创作。

代码示例

代码示例来源:origin: com.github.yamingd.argo/argo-web

public void setExt(Map ext) {
  this.ext = ext;
  if (null != ext){
    extra = new YamlMap(ext);
  }
}

代码示例来源:origin: com.github.yamingd.argo/argo-yaml

/**
 *
 * @param key 配置Key
 * @return Long
 */
public Long getLong(String key){
  Long val = get(key);
  return val;
}

代码示例来源:origin: com.github.yamingd.argo/argo-yaml

/**
 *
 * @param key 配置Key
 * @return Integer
 */
public Integer getInt(String key){
  Integer val = get(key);
  return val;
}

代码示例来源:origin: com.github.yamingd.argo/argo-yaml

/**
 * 加载并序列化为 T
 * @param fileName 配置文件(.yaml)
 * @return YamlMap
 * @throws IOException 抛出IOException
 */
public static YamlMap load(String fileName) throws IOException {
  ClassLoader classLoader = getDefaultClassLoader();
  InputStream input = classLoader.getResourceAsStream(fileName);
  if (input == null){
    throw new IOException("File not found. fileName=" + fileName);
  }
  Yaml yaml = new Yaml();
  Map o = (Map) yaml.load(input);
  return new YamlMap(o);
}

代码示例来源:origin: com.github.yamingd.argo/argo-yaml

/**
 *
 * @param key 配置Key
 * @return Boolean
 */
public Boolean getBoolean(String key){
  Boolean val = get(key);
  return val;
}

代码示例来源:origin: com.github.yamingd.argo/argo-yaml

public Long getLong(String key, Long defaultVal){
  Long val = get(key, defaultVal);
  return val;
}

代码示例来源:origin: com.github.yamingd.argo/argo-yaml

/**
 *
 * @param key 配置Key
 * @return String
 */
public String getString(String key){
  String val = get(key);
  return val;
}

代码示例来源:origin: com.github.yamingd.argo/argo-yaml

public Boolean getBoolean(String key, Boolean defaultVal){
    Boolean val = get(key, defaultVal);
    return val;
  }
}

代码示例来源:origin: com.github.yamingd.argo/argo-yaml

public Integer getInt(String key, Integer defaultVal){
  Integer val = get(key, defaultVal);
  return val;
}

代码示例来源:origin: com.github.yamingd.argo/argo-yaml

public String getLong(String key, String defaultVal){
  String val = get(key, defaultVal);
  return val;
}

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com