-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Alberto Monge
authored and
Alberto Monge
committed
Mar 15, 2018
1 parent
0ce3c13
commit 870635d
Showing
3 changed files
with
110 additions
and
46 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,33 @@ | ||
package it.polito.tdp.parole.model; | ||
|
||
import java.util.Collections; | ||
import java.util.LinkedList; | ||
import java.util.List; | ||
|
||
public class Parole { | ||
|
||
|
||
List<String> lista; | ||
|
||
public Parole() { | ||
//TODO | ||
lista = new LinkedList<String>(); | ||
// lista = new ArrayList<String>(); | ||
} | ||
|
||
public void addParola(String p) { | ||
//TODO | ||
lista.add(p); | ||
} | ||
|
||
public List<String> getElenco() { | ||
//TODO | ||
return null; | ||
Collections.sort(lista); | ||
return lista; | ||
} | ||
|
||
public void reset() { | ||
// TODO | ||
lista.clear(); | ||
} | ||
|
||
public void removeParola(String string) { | ||
lista.remove(string); | ||
} | ||
|
||
} |