@Test public void testBig_quantitatifFormatter() throws Exception { }
public static String big_quantitatifFormatter(BigInteger quantitatif, String currencyName){ BigInteger result; String plus = ""; if(quantitatif.compareTo(TRILLIARD)>=1){ result = quantitatif.divide(TRILLION); plus = PREFIX_VALUE.get(TRILLION); }else { if (quantitatif.compareTo(TRILLION) >= 1) { result = quantitatif.divide(BILLIARD); plus = PREFIX_VALUE.get(BILLIARD); } else { if (quantitatif.compareTo(BILLIARD) >= 1) { result = quantitatif.divide(BILLION); plus = PREFIX_VALUE.get(BILLION); } else { if (quantitatif.compareTo(BILLION) >= 1) { result = quantitatif.divide(MILLIARD); plus = PREFIX_VALUE.get(MILLIARD); } else { if (quantitatif.compareTo(MILLIARD) >= 1) { result = quantitatif.divide(MILLION); plus = PREFIX_VALUE.get(MILLION); }else { result = quantitatif; plus = ""; } } } } } String formatClassic = "#,###"; DecimalFormat formatter = new DecimalFormat(formatClassic); return formatter.format(result).concat(plus).concat(" ").concat(UnitCurrency.unitCurrency(currencyName)); }
Formater { public static String big_quantitatifFormatter(BigInteger quantitatif, String currencyName){ BigInteger result; String plus = ""; if(quantitatif.compareTo(TRILLIARD)>=1){ result = quantitatif.divide(TRILLION); plus = PREFIX_VALUE.get(TRILLION); }else { if (quantitatif.compareTo(TRILLION) >= 1) { result = quantitatif.divide(BILLIARD); plus = PREFIX_VALUE.get(BILLIARD); } else { if (quantitatif.compareTo(BILLIARD) >= 1) { result = quantitatif.divide(BILLION); plus = PREFIX_VALUE.get(BILLION); } else { if (quantitatif.compareTo(BILLION) >= 1) { result = quantitatif.divide(MILLIARD); plus = PREFIX_VALUE.get(MILLIARD); } else { if (quantitatif.compareTo(MILLIARD) >= 1) { result = quantitatif.divide(MILLION); plus = PREFIX_VALUE.get(MILLION); }else { result = quantitatif; plus = ""; } } } } } String formatClassic = "#,###"; DecimalFormat formatter = new DecimalFormat(formatClassic); return formatter.format(result).concat(plus).concat(" ").concat(UnitCurrency.unitCurrency(currencyName)); } }
Formater { public static String big_quantitatifFormatter(BigInteger quantitatif, String currencyName){ BigInteger result; String plus = ""; if(quantitatif.compareTo(TRILLIARD)>=1){ result = quantitatif.divide(TRILLION); plus = PREFIX_VALUE.get(TRILLION); }else { if (quantitatif.compareTo(TRILLION) >= 1) { result = quantitatif.divide(BILLIARD); plus = PREFIX_VALUE.get(BILLIARD); } else { if (quantitatif.compareTo(BILLIARD) >= 1) { result = quantitatif.divide(BILLION); plus = PREFIX_VALUE.get(BILLION); } else { if (quantitatif.compareTo(BILLION) >= 1) { result = quantitatif.divide(MILLIARD); plus = PREFIX_VALUE.get(MILLIARD); } else { if (quantitatif.compareTo(MILLIARD) >= 1) { result = quantitatif.divide(MILLION); plus = PREFIX_VALUE.get(MILLION); }else { result = quantitatif; plus = ""; } } } } } String formatClassic = "#,###"; DecimalFormat formatter = new DecimalFormat(formatClassic); return formatter.format(result).concat(plus).concat(" ").concat(UnitCurrency.unitCurrency(currencyName)); }  }
Formater { public static String big_quantitatifFormatter(BigInteger quantitatif, String currencyName){ BigInteger result; String plus = ""; if(quantitatif.compareTo(TRILLIARD)>=1){ result = quantitatif.divide(TRILLION); plus = PREFIX_VALUE.get(TRILLION); }else { if (quantitatif.compareTo(TRILLION) >= 1) { result = quantitatif.divide(BILLIARD); plus = PREFIX_VALUE.get(BILLIARD); } else { if (quantitatif.compareTo(BILLIARD) >= 1) { result = quantitatif.divide(BILLION); plus = PREFIX_VALUE.get(BILLION); } else { if (quantitatif.compareTo(BILLION) >= 1) { result = quantitatif.divide(MILLIARD); plus = PREFIX_VALUE.get(MILLIARD); } else { if (quantitatif.compareTo(MILLIARD) >= 1) { result = quantitatif.divide(MILLION); plus = PREFIX_VALUE.get(MILLION); }else { result = quantitatif; plus = ""; } } } } } String formatClassic = "#,###"; DecimalFormat formatter = new DecimalFormat(formatClassic); return formatter.format(result).concat(plus).concat(" ").concat(UnitCurrency.unitCurrency(currencyName)); }  static String quantitatifFormatter(long quantitatif, String currencyName); static String big_quantitatifFormatter(BigInteger quantitatif, String currencyName); static String big_relatifFormatter(Context context, int decimal, BigDecimal relatif); static String timeFormatterV2(Context context, long allMilli); static String relatifFormatter(Context context, int decimal, double relatif); static String formatWithSmartDecimal(long amount); }
Formater { public static String big_quantitatifFormatter(BigInteger quantitatif, String currencyName){ BigInteger result; String plus = ""; if(quantitatif.compareTo(TRILLIARD)>=1){ result = quantitatif.divide(TRILLION); plus = PREFIX_VALUE.get(TRILLION); }else { if (quantitatif.compareTo(TRILLION) >= 1) { result = quantitatif.divide(BILLIARD); plus = PREFIX_VALUE.get(BILLIARD); } else { if (quantitatif.compareTo(BILLIARD) >= 1) { result = quantitatif.divide(BILLION); plus = PREFIX_VALUE.get(BILLION); } else { if (quantitatif.compareTo(BILLION) >= 1) { result = quantitatif.divide(MILLIARD); plus = PREFIX_VALUE.get(MILLIARD); } else { if (quantitatif.compareTo(MILLIARD) >= 1) { result = quantitatif.divide(MILLION); plus = PREFIX_VALUE.get(MILLION); }else { result = quantitatif; plus = ""; } } } } } String formatClassic = "#,###"; DecimalFormat formatter = new DecimalFormat(formatClassic); return formatter.format(result).concat(plus).concat(" ").concat(UnitCurrency.unitCurrency(currencyName)); }  static String quantitatifFormatter(long quantitatif, String currencyName); static String big_quantitatifFormatter(BigInteger quantitatif, String currencyName); static String big_relatifFormatter(Context context, int decimal, BigDecimal relatif); static String timeFormatterV2(Context context, long allMilli); static String relatifFormatter(Context context, int decimal, double relatif); static String formatWithSmartDecimal(long amount); static final String MAX_INTEGER; static final BigInteger MILLION; static final BigInteger MILLIARD; static final BigInteger BILLION; static final BigInteger BILLIARD; static final BigInteger TRILLION; static final BigInteger TRILLIARD; }