コード例 #1
0
ファイル: ActorRefTest.java プロジェクト: alexrzz/pcd-actors
 @Test
 public void shouldImplementComparable() {
   ActorRef ref1 = system.actorOf(TrivialActor.class);
   ActorRef ref2 = system.actorOf(TrivialActor.class);
   Assert.assertNotEquals(
       "Two references must appear as different using the compareTo method",
       0,
       ref1.compareTo(ref2));
   Assert.assertEquals(
       "A reference must be equal to itself according to compareTo method",
       0,
       ref1.compareTo(ref1));
 }
コード例 #2
0
 @Override
 public int compareTo(ActorRef o) {
   return reference.compareTo(o);
 }