Thursday, March 26, 2009

Java set

Java set is a collection that contain unique elements.
Set sports = new HashSet();
for (Season season : currentSeasons)
{
sports.add(season.getSportLeague().getSport());
}