C0deAttack

London, United Kingdom

c0deattack.wordpress.com

Age: 29

Just a casual coder

Apr
9
awarded Nice Answer
Mar
12
awarded Popular Question
Feb
19
awarded Notable Question
Jan
5
awarded Yearling
Jan
2
awarded Autobiographer
Dec
23
awarded Favorite Question
Dec
18
awarded Stellar Question
Dec
10
comment How to test that Akka actor was created in Scala
Hi, this seems nice. But it's not clear how you can get access to the TestProbe. In your test class how are you accessing the 'probes' list given that it's a field mixed in when your actor under test is created? I don't suppose you have a code example?
Oct
21
awarded Good Answer
Oct
4
awarded Great Answer
Sep
2
answered Android Studio "Cannot resolve symbol XXX" on basic Android tutorial
Aug
28
awarded Good Question
Aug
20
awarded Popular Question
Aug
6
comment Interface method that has different parameters in Java
I did also think about creating a new Filter instance each time but this part of the code would execute quite frequently so I didn't want to create objects with new state when I could just pass in the values.
Aug
6
comment Interface method that has different parameters in Java
It's basically what I've done ended up doing, not the greatest solution because there's that chance something is added/removed in the AllFiltersState object that will affect more than one filter.
Aug
6
accepted Interface method that has different parameters in Java
Aug
5
comment Interface method that has different parameters in Java
Oh I see, the values can change at runtime, this is why the values are passed to the filters.
Aug
5
comment Interface method that has different parameters in Java
With varargs as Objects and then cast? I'd have to know the order of the data types to cast safely, not great. I read about the Command pattern and I didn't see how to have parameters of different length and types since they interface is the same with regards to the data.
Aug
5
comment Interface method that has different parameters in Java
It's a fair idea, but I'm trying to avoid having the controller know what kinds of Filters there are. To set the state as you suggest, I'd have to do instance of checks.
Aug
5
comment Interface method that has different parameters in Java
@stan0; there are a couple of doFilter methods in the example above, they have different argument lists.
1 2 3 4 5