1
0
Fork 0

Strukturanpassung in Persistenz.java

Philipp Kotte 2023-10-11 17:04:28 +02:00
parent 330548712e
commit 253f29e2a8
1 changed files with 40 additions and 3 deletions

View File

@ -12,8 +12,28 @@ import java.io.*;
public class Persistenz { public class Persistenz {
/*------------------------------------------*/
// statische Konstanten
/*------------------------------------------*/
/*------------------------------------------*/
// statische Attribute(zB. zähler)
/*------------------------------------------*/
final static String FILE_NAME = "WIZARD_DATA_"; final static String FILE_NAME = "WIZARD_DATA_";
/*------------------------------------------*/
// Attribute jedes Objektes
/*------------------------------------------*/
/*------------------------------------------*/
// Konstruktoren (default und spezifische)
/*------------------------------------------*/
/*------------------------------------------*/
// statische Methoden
/*------------------------------------------*/
public static boolean sindDatenVorhanden(String name) { public static boolean sindDatenVorhanden(String name) {
File f = new File(FILE_NAME + name + ".ser"); File f = new File(FILE_NAME + name + ".ser");
if (f.exists()) { if (f.exists()) {
@ -34,4 +54,21 @@ public class Persistenz {
ois.close(); ois.close();
return spiel; return spiel;
} }
/*------------------------------------------*/
// Getter und Setter
/*------------------------------------------*/
/*------------------------------------------*/
// @Overrides
/*------------------------------------------*/
/*------------------------------------------*/
// öffentliche Methodes
/*------------------------------------------*/
/*------------------------------------------*/
// Hilfsmethoden (privat)
/*------------------------------------------*/
} }