|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.ObjectContenitoreOrdinatoStudenti
public class ContenitoreOrdinatoStudenti
| Constructor Summary | |
|---|---|
ContenitoreOrdinatoStudenti()
inizializza un archivio vuoto |
|
ContenitoreOrdinatoStudenti(java.lang.String filename)
inizializza un archivio, inserendo dati acquisiti da file i dati sono inseriti mantenendo ordinato l'archivio |
|
| Method Summary | |
|---|---|
void |
aggiungi(java.lang.String nome,
int matr)
Aggiunge un oggetto, ridimensionando l'array se richiesto. |
boolean |
isEmpty()
verifica se il contenitore è vuoto. |
static void |
main(java.lang.String[] args)
|
void |
makeEmpty()
rende vuoto il contenitore. |
int |
size()
ritorna il numero di elementi presenti nel contenitore |
Studente |
togliMax()
ritorna il valore massimo del contenitore (massimo nel senso di compareTo()), cancellandolo dal contenitore. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ContenitoreOrdinatoStudenti()
public ContenitoreOrdinatoStudenti(java.lang.String filename)
throws java.io.IOException
filename - nome del file da cui vengono acquisiti i dati
java.io.IOException| Method Detail |
|---|
public boolean isEmpty()
isEmpty in interface Containerpublic void makeEmpty()
makeEmpty in interface Containerpublic int size()
size in interface Container
public void aggiungi(java.lang.String nome,
int matr)
nome - nome dello studente da aggiungerematr - numero di matricola dello studente da aggiungere
public Studente togliMax()
throws java.util.NoSuchElementException
java.util.NoSuchElementException - se l'array e' vuoto
public static void main(java.lang.String[] args)
throws java.io.IOException
java.io.IOException
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||