Jump to content
  • 0

Fastlist -> Arraylist Acis


L2shaken

Question

http://imgur.com/a/1oYgm

protected int getWinnerTeam()
	{
		ArrayList<EventTeam> t = new ArrayList<>();
		
		for (EventTeam team : teams.values())
		{
			if (t.size() == 0)
			{
				t.add(team);
				continue;
			}
			
			if (team.getScore() > t.getFirst().getScore())
			{
				t.clear();
				t.add(team);
				continue;
			}
			
			if (team.getScore() == t.getFirst().getScore())
				t.add(team);
		}
		
		if (t.size() > 1)
			return 0;
		
		return t.getFirst().getId();
	}

getFirst () must be replaced by what?

Edited by L2shaken
Link to comment
Share on other sites

Recommended Posts

  • 0

I wouldn't have done it the way he did as it doesn't meet my standard (static method would be to disallow override bad impl eg), yet that's works as well and shouldn't be blamed. It's just for arguing really.

Link to comment
Share on other sites

  • 0

I wouldn't have done it the way he did as it doesn't meet my standard (static method would be to disallow override bad impl eg), yet that's works as well and shouldn't be blamed. It's just for arguing really.

 

For gods sake its just a convenience method that toggles last known players instance pointer for global access on the project... Should I make another class, will that make any difference? I don't get it why we are even talking about this. Codecrash was desperately squeezing my codes line by line to find a flaw so he can trashtalk about. Then he talks about standards he doesn't even know about.

Edited by xxdem
Link to comment
Share on other sites

  • 0

 I argue with SweeTs

But I am not arguing with ya. No one gives a damn about you :lol:

 

 

That's when people that don't understand shit enter a debate

I was sure you are lurking around and sooner or later you show up :lol:

Link to comment
Share on other sites

  • 0

For gods sake its just a convenience method that toggles last known players instance pointer for global access on the project... Should I make another class, will that make any difference? I don't get it why we are even talking about this. Codecrash was desperately squeezing my codes line by line to find a flaw so he can trashtalk about. Then he talks about standards he doesn't even know about.

Yeah I hate those util class as well.

 

Just it's not the purpose of interface static method but as I said it works great that way and can understand why you did it.

Link to comment
Share on other sites

  • 0

Yeah I hate those util class as well.

 

Just it's not the purpose of interface static method but as I said it works great that way and can understand why you did it.

 

I am glad you get the point.

 

I agreed that static methods don't belong on interfaces for readability reasons, but a person with real knowledge knows that in the very end theres no actual difference. Static methods always belong to the class and even interfaces are always backed by one.

 

I bet that these noobs don't really know that even enums are actually classes and their values just pointers to self singleton references

Edited by xxdem
Link to comment
Share on other sites

  • 0

It's so fucking hilarious. You judge EVERYONE in here (in a bad manner), for imperfect coding, i mean hell, you judged me without even looking at my coding and now that Elfo does the same thing to you, you feel the need to defend yourself.

 

That's what i meant by "a taste of your own medicine" and for some reason you and Sdw thought i was judging you as well, or licking Elfo. My point was, that if you judge everyone for the slightest things, be prepared for the same to happen to you.

Link to comment
Share on other sites

  • 0

Yet, when you say things such as "Good job owning him", make sure you understand properly what you just read.

 

 

2 people arguing might be right, or wrong at the same time.

Link to comment
Share on other sites

  • 0

Yet, when you say things such as "Good job owning him", make sure you understand properly what you just read.

 

 

2 people arguing might be right, or wrong at the same time.

Please read my post again, only thing i said was "well played", which i still believe because it's the first time i see this retard taking a defensive stance and not attacking everyone.

 

 

It's funny to see the man that judges everyone and everything finally getting a taste of his own medicine.

 

Well played Elfo, well played.

Edited by Versus
Link to comment
Share on other sites

  • 0

It's so fucking hilarious. You judge EVERYONE in here (in a bad manner), for imperfect coding, i mean hell, you judged me without even looking at my coding and now that Elfo does the same thing to you, you feel the need to defend yourself.

 

That's what i meant by "a taste of your own medicine" and for some reason you and Sdw thought i was judging you as well, or licking Elfo. My point was, that if you judge everyone for the slightest things, be prepared for the same to happen to you.

 

I welcome it, but his argument was shit, none was supposed to say good played at him

Link to comment
Share on other sites

  • 0

lol, this topic is a masterpiece... :lol:

Take a step back and literally kiss your own face. This topic is valuable. Worths 4k euro more than  stalonka leech

Crawl back to your cave cause noone loves you :'( sad storki

Edited by AccessDenied
Link to comment
Share on other sites

  • 0

Take a step back and literally kiss your own face. This topic is valuable. Worths 4k euro more than  stalonka leech

Crawl back to your cave cause noone loves you :'( sad storki

Me don't care... :lol:

Link to comment
Share on other sites

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.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.




×
×
  • Create New...