class StringAmount {

  public static boolean compare(final StringAmount value1, final StringAmount value2, final double tolerance) {
    final Set<String> set1 = value1._data.keySet();
    final Set<String> set2 = value2._data.keySet();
    if (!set1.equals(set2)) {
      return false;
    }
    for (final String p : set1) {
      if (Math.abs(value1._data.get(p) - value2._data.get(p)) > tolerance) {
        return false;
      }
    }
    return true;
  }

  public  StringAmount();
  private  StringAmount(final HashMap<String, Double> map);

}