import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import java.util.ArrayList;
import java.util.List;
@JsonIgnoreProperties(ignoreUnknown = true)
-public class ParsedLedgerAccount {
+public class ParsedLedgerAccount extends net.ktnx.mobileledger.json.ParsedLedgerAccount {
private List<ParsedBalance> aebalance;
private List<ParsedBalance> aibalance;
- private String aname;
- private int anumpostings;
public ParsedLedgerAccount() {
}
- public int getAnumpostings() {
- return anumpostings;
- }
- public void setAnumpostings(int anumpostings) {
- this.anumpostings = anumpostings;
- }
public List<ParsedBalance> getAebalance() {
return aebalance;
}
public void setAibalance(List<ParsedBalance> aibalance) {
this.aibalance = aibalance;
}
- public String getAname() {
- return aname;
- }
- public void setAname(String aname) {
- this.aname = aname;
- }
+ @Override
+ public List<SimpleBalance> getSimpleBalance() {
+ List<SimpleBalance> result = new ArrayList<SimpleBalance>();
+ for (ParsedBalance b : getAibalance()) {
+ result.add(new SimpleBalance(b.getAcommodity(), b.getAquantity()
+ .asFloat()));
+ }
+ return result;
+ }
}