com.testdroid.api.formatter.CurrencyFormatter Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of testdroid-api Show documentation
Show all versions of testdroid-api Show documentation
The Testdroid API library for Java
package com.testdroid.api.formatter;
import java.math.BigDecimal;
import java.text.NumberFormat;
import java.util.Locale;
/**
* @author Damian Sniezek
*/
public class CurrencyFormatter {
private CurrencyFormatter() {
throw new IllegalStateException("Utility class");
}
public static String format(Long value) {
return NumberFormat.getCurrencyInstance(Locale.US).format(BigDecimal.valueOf(value, 2));
}
}