Aggiunti i javadoc ai metodi e alle classi

Apportate leggeri cambiamenti alla grafica
This commit is contained in:
Simone Argenziano
2013-12-19 14:23:31 +01:00
parent 68886fd406
commit 76445c07b9
14 changed files with 407 additions and 128 deletions

View File

@@ -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);
}
}
}