|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectSortableContainer
public class SortableContainer
Constructor Summary | |
---|---|
SortableContainer()
|
Method Summary | |
---|---|
void |
add(java.lang.Comparable compObj)
Aggiunge un elemento ridimensionando l'array se necessario. |
boolean |
isEmpty()
verifica se il contenitore e' vuoto. |
void |
makeEmpty()
rende vuoto il contenitore |
java.lang.Object |
removeLast()
cancella e ritorna l'ultimo elemento dal contenitore. |
int |
size()
restituisce il numero di elementi presenti nel contenitore. |
void |
sort()
ordina l'archivio in modo che il metodo removeLast() restituisca il massimo. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SortableContainer()
Method Detail |
---|
public boolean isEmpty()
Container
isEmpty
in interface Container
public void makeEmpty()
makeEmpty
in interface Container
public int size()
Container
size
in interface Container
public void add(java.lang.Comparable compObj)
compObj
- oggetto da aggiungerepublic java.lang.Object removeLast() throws java.util.NoSuchElementException
java.util.NoSuchElementException
- se l'array e' vuotopublic void sort()
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |