From 72f3ed5ba69e82c609a8d79084451d29bec84b35 Mon Sep 17 00:00:00 2001 From: Kevin Pfannenstiel Date: Mon, 28 Nov 2022 10:43:34 +0100 Subject: [PATCH] =?UTF-8?q?static=20wurde=20der=20methode=20readdata=20erg?= =?UTF-8?q?=C3=A4nzt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../VPR_SCRIPT/GeneralMethods.class | Bin 2045 -> 4014 bytes src/GeneralMethods.java | 12 ++++++------ 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/out/production/VPR_SCRIPT/GeneralMethods.class b/out/production/VPR_SCRIPT/GeneralMethods.class index fc5fdc44b3c9e7f3cef0b7419e77c62043c864df..50de9caf77617662f93578fd34f1bf1dbfe41b7e 100644 GIT binary patch literal 4014 zcmcInTW}lI8UBuSSzXq)P-3u1$fa>0@+D3L2_Pj7wsOH#cHG#+I0+$ZX=80H@2abn zlh77=g+f|-ZwYN_pW@f>;s6;sJmsO&r#|(m51r1mJoS+_Gp+lb-IbBB(qWjXJ>K)5 zbN=(6|NH*Su7CfZ_kRcAFn$|D2LcL$DnbYgBra*o+HgfP7lu#HU($qYa5PkD~Jgs8+*r%iteq)5QQr3cMA0EDSUFnv|}6Q zLN0we1_j+xBO$QK*PwatxVxXkCIy>S^x%G~xF+h3Q5hb!ZS88osL{`e^g(khn-13_dAdXQP`7wd6Pl7JBBRDD`vN7z$aTO==L+5|o#@a@%{(mbzO>VaN1tXc6RB;khjHp&BeX6Xy z!p)`6L~x3P)@!<5lY~YvBM`Ifl0R2)nzWwKO_oh%LU+nmiFku~tE4l%Wb7vEOY^!t zqs>>ik}Oz7t#Vqk4LSE0gHGAtp+uq8Opf=u34c^`G=ctma@bnLEOiEzc#<3WWFvAd zvb=k}-3<+hw+cGiv%cL_I?|&mi@@zEL|Jkj^Ho3P1sg~!)~nS9-sYrT?>&b$dOO1V zI^E)&(5gOH(P?AB)SS9aA4fhTBW+DfmLjsmJa*GIe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YVE+saQD3K^#;pF`z*wMb=nzd)%ibq?L=(daet0s0g!oYpVf z3Qdk@yOvjS6*`Bjqvy+ZA`Dspz`KXhjrCKfieANzUH!oKn$190?OwrTr~C zY?!y?S-GE0#v1G|CixFO^8>Hnyd`x#v^ zFpitzktCxsSwaNiDcRTP5vM5=X@QA6mW*P#Wnx;0>Z1KvdMLJ86Su_{$rVbwqAqd-errj)Y^E0*iXci9;BwjBnwW@=$l z?6l0!ZOgM1qSZ22Y6}Ll_GmCHTwq>FRyW<;%lmL0XM{#1)F*Q~GyYI2C_p7;0ce#q5q(8&$ygxfxYp1Ma^OCbww7fl+RHxom zursim{V52*{iU#Sm=EYe6EDSf^pI{ZZt!Bfi9UMuW0DuwEe!fR zC&(qi)4YI1MmOujc$#Bf6#YKAEjZ)BaVmk3E^Av{0`sqO+@{hOhlL2BaE*d;rbfI{p1jzWm#+L zM3LSqMdG5!Wc&c1?;rokWo92uS*~NxeX>dZdR8PEVP+u4-?uoT7-h+0EHyz{t|G~| zDc(|PT*C||PGpHP<_BMvR$kse!XnW$MG`S&DrT|aiy?1;Xd+9{c(I5qBE|s1|Dr=< b+*e}om~#@M5>&?*BV1M^NB2D4L$Ln?$m--5 diff --git a/src/GeneralMethods.java b/src/GeneralMethods.java index 1167648..373ff18 100644 --- a/src/GeneralMethods.java +++ b/src/GeneralMethods.java @@ -41,13 +41,13 @@ public class GeneralMethods { * @param pathRead determines the filename of the file that will be read * @return menueList, userList, orderList depending on Data read */ - public ArrayList readData(String pathRead) { + public static ArrayList readData(String pathRead) { Path path = Paths.get(pathRead); try { List rows = Files.readAllLines(path); - if (pathRead == "menue.txt") { + if (pathRead.equals("menue.txt")) { ArrayList menueList = new ArrayList<>(); for (String row : rows) { @@ -64,7 +64,7 @@ public class GeneralMethods { } return menueList; - } else if (pathRead == "users.txt") { + } else if (pathRead.equals("users.txt")){ ArrayList userList = new ArrayList<>(); for (String row : rows) { @@ -79,7 +79,7 @@ public class GeneralMethods { } return userList; - } else if (pathRead == "orders.txt") { + } else if (pathRead.equals("orders.txt")) { ArrayList orderList = new ArrayList<>(); for (String row : rows) { @@ -113,9 +113,9 @@ public class GeneralMethods { * @param listToWrite determines which ArrayList is to be used for writing the file */ public void writeData2 (String pathWrite, ArrayList listToWrite){ - if (pathWrite == "users.txt") { + if (pathWrite.equals("users.txt")) { - } else if (pathWrite == "orders.txt") { + } else if (pathWrite.equals("orders.txt")) { } }