Strategy pattern: differenze tra le versioni

Contenuto cancellato Contenuto aggiunto
m Fix link
Riga 69:
private ISortStrategy sortstrategy;
 
public SortedDocumentList( List<Document> documents ){
this.documentList = documents;
}
public void setSortStrategy(ISortStrategy sortstrategy)
Line 122 ⟶ 125:
public void sort(List<Document> documents){
QuickDocumentSort quickDocumentSort = new QuickdocumentSort(documents);
SortedDocumentList sortedDocumentList = new SortedDocumentList( documents );
 
//Aggiungi l'algoritimo per effettuare l'ordinamento
Line 132 ⟶ 135:
sortedDocumentList.sort();
 
MergeDocumentSort mergeDocumentSort = new MergeDocumentSort (documents);
 
sortedDocumentList.setSortStrategy(mergeDocumentSort);