|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectArchivioStudenti
public class ArchivioStudenti
Constructor Summary | |
---|---|
ArchivioStudenti()
costruttore: inizializza un archivio vuoto. |
|
ArchivioStudenti(java.lang.String filename)
costruttore: inizializza un archivio, inserendo i dati letti dal file filename |
Method Summary | |
---|---|
void |
aggiungi(Studente unoStudente)
aggiunge all'archivio uno studente |
boolean |
isEmpty()
verifica se l'archivio e' vuoto |
Studente |
rimuovi()
rimuove il primo elemento dell'archivio. |
java.lang.String |
toString()
restituisce una stringa che contiene i dati degli studenti memorizzati nell'archivio. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public ArchivioStudenti()
public ArchivioStudenti(java.lang.String filename) throws java.io.FileNotFoundException, java.io.IOException
filename
- nome del file da cui acquisire dati
java.io.FileNotFoundException
- se il file filename non esiste
java.io.IOException
Method Detail |
---|
public void aggiungi(Studente unoStudente)
unoStudente
- lo studente da aggiungerepublic boolean isEmpty()
public Studente rimuovi() throws java.util.NoSuchElementException
java.util.NoSuchElementException
- se il metodo viene invocato
quando l'archivio e' vuotopublic java.lang.String toString()
toString
in class java.lang.Object
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |