Exemple #1
1
 void sortTransactionByDate() {
   List<Transaction> tr = new ArrayList<Transaction>(transactions.values());
   tr.sort(Transaction.DateComparator);
   for (Transaction t : tr) {
     t.displayTransaction();
   }
 }
Exemple #2
1
 void sortbyAccount() {
   List<Accounts> ac = new ArrayList<Accounts>(accounts.values());
   ac.sort(Accounts.AccountComparator);
   for (Accounts a : ac) {
     a.dispaly();
   }
 }
Exemple #3
0
 void sortAccountByType() {
   List<Accounts> ac = new ArrayList<Accounts>(accounts.values());
   ac.sort(Accounts.TypeComparator);
   ac.stream()
       .forEach(
           (a) -> {
             a.dispaly();
           });
 }
Exemple #4
0
 void sortAccountByCustomer() {
   List<Customer> cl = new ArrayList<Customer>(customers.values());
   cl.sort(Customer.CustomerComparatorByName);
   for (Customer c : cl) {
     System.out.println("Customer Name: " + c.CustomerName);
     Accounts a = accounts.get(c.AccountId);
     a.dispaly();
   }
 }