1 package net.ktnx.mobileledger;
3 import android.annotation.SuppressLint;
4 import android.support.annotation.NonNull;
7 private String currency;
11 LedgerAmount(float amount, @NonNull String currency) {
12 this.currency = currency;
17 LedgerAmount(float amount) {
22 @SuppressLint("DefaultLocale")
24 public String toString() {
25 if (currency == null) return String.format("%,1.2f", amount);
26 else return String.format("%s %,1.2f", currency, amount);