]> git.ktnx.net Git - mobile-ledger.git/blobdiff - app/src/main/java/net/ktnx/mobileledger/model/LedgerTransactionAccount.java
whitespace
[mobile-ledger.git] / app / src / main / java / net / ktnx / mobileledger / model / LedgerTransactionAccount.java
index 6f8c3b4476a5136dcb787ec2f25f4ae05f8380d5..1446be790fd21b3264370ce0355c8cc08ed3b170 100644 (file)
@@ -17,6 +17,8 @@
 
 package net.ktnx.mobileledger.model;
 
+import androidx.annotation.NonNull;
+
 import net.ktnx.mobileledger.json.ParsedAmount;
 import net.ktnx.mobileledger.json.ParsedPosting;
 import net.ktnx.mobileledger.json.ParsedQuantity;
@@ -24,8 +26,6 @@ import net.ktnx.mobileledger.json.ParsedStyle;
 
 import java.util.ArrayList;
 
-import androidx.annotation.NonNull;
-
 public class LedgerTransactionAccount {
     private String accountName;
     private String shortAccountName;
@@ -50,16 +50,16 @@ public class LedgerTransactionAccount {
     public String getAccountName() {
         return accountName;
     }
-    public String getShortAccountName() {
-        return shortAccountName;
-    }
     public void setAccountName(String accountName) {
         this.accountName = accountName;
         shortAccountName = accountName.replaceAll("(?<=^|:)(.)[^:]+(?=:)", "$1");
     }
-
+    public String getShortAccountName() {
+        return shortAccountName;
+    }
     public float getAmount() {
-        if (!amountSet) throw new IllegalStateException("Account amount is not set");
+        if (!amountSet)
+            throw new IllegalStateException("Account amount is not set");
 
         return amount;
     }
@@ -81,7 +81,8 @@ public class LedgerTransactionAccount {
     }
     @NonNull
     public String toString() {
-        if (!amountSet) return "";
+        if (!amountSet)
+            return "";
 
         StringBuilder sb = new StringBuilder();
         if (currency != null) {