public String getMatchInfo(int scheduleSize)
{[INDENT] if (matchMap.size() == 0)
{[INDENT] return "Schedule of stadium " + stadiumName + " is empty";
[/INDENT]}
else
{[INDENT] String schedule = "Schedule of stadium " + stadiumName + ":\n";
Iterator it = matchMap.entrySet().iterator();
switch (scheduleSize)
{[INDENT] case 0:
while (it.hasNext())
{[INDENT] HashMap.Entry<Integer, Match> pairs = (HashMap.Entry<Integer, Match>)it.next(); //error there: The type HashMap.Entry is
//not visible
schedule += (pairs.getValue()).getPreMatchInfo();
schedule += "\n";
[/INDENT]}
default:
int i = 0;
while (it.hasNext())
{[INDENT] i++;
if (i > matchMap.size())[INDENT] break;
[/INDENT]HashMap.Entry<Integer, Match> pairs = (HashMap.Entry<Integer, Match>)it.next(); // Error there: The type HashMap.Entry is
//not visible
schedule += (pairs.getValue()).getPreMatchInfo();
schedule += "\n";
[/INDENT]}
[/INDENT]}
return schedule;
[/INDENT]}
[/INDENT]}
HashMap is imported
Edited by ZekeDragon, 17 October 2010 - 03:04 AM.
Please use [code] tags when posting code.


Sign In
Create Account


Back to top









