Exemple #1
0
  public static String getString(String key, String defaultaValue) {
    Map<String, String> stringMape = Singleton.getInstance().getStringMap();
    String value = stringMape.get(key);

    if (value == null) {
      value = defaultaValue;
      stringMape.put(key, value);
    }

    return value;
  }
Exemple #2
0
  public static Long getLong(String key, Long defaultValue) {
    Map<String, Long> longMap = Singleton.getInstance().getLongMap();

    Long value = longMap.get(key);
    if (value == null) {
      value = defaultValue;
      longMap.put(key, value);
    }

    return value;
  }