|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectStudentSortedContainer
public class StudentSortedContainer
Constructor Summary | |
---|---|
StudentSortedContainer()
inizializza un archivio vuoto |
Method Summary | |
---|---|
void |
add(java.lang.String nome,
int matr)
Aggiunge un elemento al contenitore, ridimensionandolo se richiesto. |
void |
add(java.lang.String studentString,
java.lang.String delimiters)
Aggiunge un elemento al contenitore. |
java.lang.String |
findName(int matr)
restituisce il nome dello studente il cui numero di matricola coincide con il parametro esplicito. |
boolean |
isEmpty()
verifica se il contenitore è vuoto. |
static void |
main(java.lang.String[] args)
rende la classe eseguibile. |
void |
makeEmpty()
rende vuoto il contenitore. |
Studente |
removeMax()
ritorna il valore massimo del contenitore (massimo nel senso dell'ordinamento naturale della classe Studente, cancellandolo dal contenitore. |
int |
size()
ritorna il numero di elementi presenti nel contenitore |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public StudentSortedContainer()
Method Detail |
---|
public boolean isEmpty()
isEmpty
in interface Container
public void makeEmpty()
makeEmpty
in interface Container
public int size()
size
in interface Container
public void add(java.lang.String nome, int matr)
nome
- nome dello studente da aggiungerematr
- numero di matricola dello studente da aggiungerepublic void add(java.lang.String studentString, java.lang.String delimiters)
studentString
- stringa in formato matricolaxnome, dove x e' un carattere delimitatoredelimiters
- caratteri delimitatori
java.util.NoSuchElementException
- se la stringa non ha il formato correttopublic java.lang.String findName(int matr)
matr
- il numero di matricola
java.util.NoSuchElementException
- se il numero di matricola
non e' presentepublic Studente removeMax()
java.util.NoSuchElementException
- se l'array e' vuotopublic static void main(java.lang.String[] args)
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |