protected int getVoteWinner()
{
int old = 0;
HashMap<Integer, Integer> temp = new HashMap<>();
for (int vote : votes.values())
{
if (!temp.containsKey(vote))
temp.put(vote, 1);
else
{
old = temp.get(vote);
old++;
temp.getEntry(vote).setValue(old);
}
}
int max = temp.head().getNext().getValue();
int result = temp.head().getNext().getKey();
for (Map.Entry<Integer, Integer> entry : temp.entrySet())
{
if (entry.getValue() > max)
{
max = entry.getValue();
result = entry.getKey();
}
}
votes.clear();
temp = null;
return result;
}
How do I solve this problem? Use aCis 350, replaces FastMap with HashMap and is giving this error.
You can post now and register later.
If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.
Good luck with your project - from the moment you take pleasure, it's the essential.
If you manage to improve performance over specific points compared to L2J (knownlist, geoengine, movement,...), don't hesitate to share back on your topic what/why you did it and the actual performance gain, if measured.
Question
L2shaken
http://imgur.com/a/KJwdY
How do I solve this problem? Use aCis 350, replaces FastMap with HashMap and is giving this error.
Edited by L2shakenLink to comment
Share on other sites
17 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.