Fix: code refactor

main
Caner 2022-12-05 15:40:15 +01:00
parent a290d39a28
commit 3ad46a9f50
2 changed files with 0 additions and 20 deletions

View File

@ -3,11 +3,7 @@ package de.hs_mannheim.informatik.bank.domain;
import java.io.Serializable; import java.io.Serializable;
import java.util.ArrayList; import java.util.ArrayList;
<<<<<<< HEAD
public class Konto implements Serializable, Comparable{ public class Konto implements Serializable, Comparable{
=======
public class Konto implements Serializable, Comparable {
>>>>>>> 289dcd60adcdb9f61a6e8c635cd7b44738879c18
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
@ -93,10 +89,6 @@ public class Konto implements Serializable, Comparable {
Konto k = (Konto) o; Konto k = (Konto) o;
return (int) (k.getKontostand() - this.getKontostand()); return (int) (k.getKontostand() - this.getKontostand());
<<<<<<< HEAD
=======
>>>>>>> 289dcd60adcdb9f61a6e8c635cd7b44738879c18
} }

View File

@ -62,7 +62,6 @@ public class Banksystem {
public String[] getKontenlisteForKunde(){ public String[] getKontenlisteForKunde(){
Collection<Konto> konten = bank.getKundenKonto(currentKunde); Collection<Konto> konten = bank.getKundenKonto(currentKunde);
<<<<<<< HEAD
TreeSet<Konto> ts = new TreeSet<Konto>(konten); TreeSet<Konto> ts = new TreeSet<Konto>(konten);
@ -71,17 +70,6 @@ public class Banksystem {
ts.stream().forEach(konto -> { ts.stream().forEach(konto -> {
liste[ts.headSet(konto).size()] = konto.toString(); liste[ts.headSet(konto).size()] = konto.toString();
}); });
=======
TreeSet<Konto> ts = new TreeSet<Konto>(konten);
String[] liste = new String[konten.size()];
int i = 0;
for (Konto k : ts) {
liste[i++] = k.toString();
}
>>>>>>> 289dcd60adcdb9f61a6e8c635cd7b44738879c18
return liste; return liste;