There are three kinds of actuaries: those who can count, and those who can't.
Carey Brown wrote:You haven't given us enough information to go on. You are only calling Log.v() once, yet your output shows it being called multiple times. Each time this section of code is executed the (presumably) list switchTheseOn is being added to. If you are not starting with a new list each time, or clearing out the old list, then I would expect the results your getting.
I doubt it but you can always comment it out and try it.Adam Wentz wrote:So, if I ax the loop I should fix the problem?
Carey Brown wrote:
I doubt it but you can always comment it out and try it.Adam Wentz wrote:So, if I ax the loop I should fix the problem?
Piet Souris wrote:If you have these lists: {a, a} and {a, b, c} what would you expect as outcome? Is the operation commutative? Are the elements implemeting the equals method correctly? And do have a look at the method 'retainAll'.
Carey Brown wrote:Need to see how you are setting up switchOnThese. Every time you call this block of code this list (?) will get longer. If you don't re-initialize it you will get duplicates.
Piet Souris wrote:Then do a simple second test. Say, compare the lists A and B.
There are three kinds of actuaries: those who can count, and those who can't.
Piet Souris wrote:Sorry Carey, but better two replies than none!
Hmm... but what do you get with
There are three kinds of actuaries: those who can count, and those who can't.
Piet Souris wrote:10 lines, while each line has 10 elements. Are these lines printed in a loop or so? I would expect to see just a single line.
Adam Wentz wrote:Yes, there is a loop involved.
There are three kinds of actuaries: those who can count, and those who can't.
Don't get me started about those stupid light bulbs. |