Skip to content

Commit

Permalink
generics in use
Browse files Browse the repository at this point in the history
  • Loading branch information
ColtonPhillips committed Jun 30, 2013
1 parent 881a563 commit b42f398
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions GenerateTheme.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@ public static ArrayList<String> getArrayListFromFile(File f)
return list;
}

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

0 comments on commit b42f398

Please sign in to comment.