Switching over to immutable.Iterable where possible

This commit is contained in:
Viktor Klang 2012-11-07 16:35:14 +01:00
parent 8f131c680f
commit b00c47854b
44 changed files with 385 additions and 369 deletions

View file

@ -180,16 +180,14 @@ public class CustomRouterDocTestBase {
//#crRoutingLogic
return new CustomRoute() {
@Override
public Iterable<Destination> destinationsFor(ActorRef sender, Object msg) {
public scala.collection.immutable.Seq<Destination> destinationsFor(ActorRef sender, Object msg) {
switch ((Message) msg) {
case DemocratVote:
case DemocratCountResult:
return Arrays.asList(
new Destination[] { new Destination(sender, democratActor) });
return akka.japi.Util.immutableSingletonSeq(new Destination(sender, democratActor));
case RepublicanVote:
case RepublicanCountResult:
return Arrays.asList(
new Destination[] { new Destination(sender, republicanActor) });
return akka.japi.Util.immutableSingletonSeq(new Destination(sender, republicanActor));
default:
throw new IllegalArgumentException("Unknown message: " + msg);
}