Skip to content

Commit

Permalink
choose can just use List
Browse files Browse the repository at this point in the history
  • Loading branch information
ColtonPhillips committed Jun 30, 2013
1 parent aa4b1ca commit 881a563
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion GenerateTheme.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import java.io.FileNotFoundException;
import java.util.Scanner;
import java.io.File;
import java.util.List;
import java.util.ArrayList;
import java.util.Random;

Expand All @@ -19,7 +20,7 @@ public static ArrayList<String> getArrayListFromFile(File f)
}

// TODO Make generic
public static String choose(ArrayList<String> list) {
public static String choose(List<String> list) {
Random randomGenerator = new Random();
int index = randomGenerator.nextInt(list.size());
return list.get(index);
Expand Down

0 comments on commit 881a563

Please sign in to comment.