Aggiunti i javadoc ai metodi e alle classi
Apportate leggeri cambiamenti alla grafica
This commit is contained in:
@@ -12,8 +12,21 @@ import java.util.ArrayList;
|
||||
* Date: 18/12/13
|
||||
* Time: 00:41
|
||||
*/
|
||||
|
||||
/**
|
||||
*
|
||||
* Classe che rappresenta il contatore generale dell'id di ogni articolo presente in catalogo
|
||||
*
|
||||
*/
|
||||
public class IdCounter {
|
||||
|
||||
/**
|
||||
*
|
||||
* Questo metodo salva il contatore dell'id sul disco.
|
||||
* @throws FileNotFoundException
|
||||
* @throws IOException
|
||||
* @throws ClassNotFoundException
|
||||
*/
|
||||
public static void save_counter() throws FileNotFoundException,IOException,ClassNotFoundException{
|
||||
File f_data = new File("id_counter");
|
||||
Integer data = Integer.valueOf(Global.getGeneral_counter());
|
||||
@@ -23,6 +36,13 @@ public class IdCounter {
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Questo metodo legge il valore del contatore e lo setta.
|
||||
*
|
||||
* @throws FileNotFoundException
|
||||
* @throws IOException
|
||||
* @throws ClassNotFoundException
|
||||
*/
|
||||
public static void restore_counter() throws FileNotFoundException,IOException,ClassNotFoundException{
|
||||
File f_data = new File("id_counter");
|
||||
if ( (f_data.exists())){
|
||||
@@ -32,10 +52,6 @@ public class IdCounter {
|
||||
}else{
|
||||
|
||||
Global.setGeneral_counter(0);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user