|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectlsd.LinkedList
public class LinkedList
Classe LinkedList: Semplice gestione di una lista unidirezionale con la possibilità di avere un iteratore (cursore), definito nella classe LinkedListIterator.
| Constructor Summary | |
|---|---|
LinkedList()
Costruttore di lista vuota |
|
| Method Summary | |
|---|---|
boolean |
add(java.lang.Object x)
Inserisce un oggetto in fondo alla lista. |
void |
clear()
Svuota la lista. |
boolean |
contains(java.lang.Object x)
Verifica se la lista contiene l'oggetto specificato, usando il metodo standard equals (l'oggetto può occorrere più volte). |
boolean |
isEmpty()
Verifica che la lista sia logicamente vuota. |
java.util.Iterator |
iterator()
Restituisce un iteratore sulla lista per scandire gli oggetti in sequenza a partire dall'inizio della lista. |
boolean |
remove(java.lang.Object x)
Cancella la prima occorrenza dell'oggetto a partire dall'inizio della lista, che rimane inalterata se non contiene l'oggetto. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public LinkedList()
| Method Detail |
|---|
public boolean isEmpty()
isEmpty in interface Listtrue se la lista è vuota;
false altrimenti.public void clear()
clear in interface Listpublic boolean contains(java.lang.Object x)
contains in interface Listx - l'oggetto da cercare nella lista.
true se la lista contiene l'oggetto;
false altrimenti.
java.lang.IllegalArgumentException - se l'argomento passato
è null.public boolean add(java.lang.Object x)
add in interface Listx - l'oggetto da inserire, diverso da null.
true come richiesto da Java Collection API.
java.lang.IllegalArgumentException - se l'argomento passato
è null.public boolean remove(java.lang.Object x)
remove in interface Listx - l'oggetto da cancellare, se presente e diverso
da null.
true se la lista contiene l'oggetto;
false altrimenti.
java.lang.IllegalArgumentException - se l'argomento passato
è null.public java.util.Iterator iterator()
iterator in interface ListConcurrentModificationException - se
avviene una modifica concorrente mediante altri metodi.Iterator
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||