@@ -324,14 +324,14 @@ public Boolean apply(Integer item) {
324324 }
325325 });
326326 assertEquals ("Optional.of(2)" , result .toString ());
327- final Optional <Integer > resultChain = ( Optional < Integer >) $ .chain (asList (1 , 2 , 3 , 4 , 5 , 6 )).find (
327+ final Optional <Integer > resultChain = $ .chain (asList (1 , 2 , 3 , 4 , 5 , 6 )).find (
328328 new Predicate <Integer >() {
329329 public Boolean apply (Integer item ) {
330330 return item % 2 == 0 ;
331331 }
332332 }).item ();
333333 assertEquals ("Optional.of(2)" , resultChain .toString ());
334- final Optional <Integer > resultChain2 = ( Optional < Integer >) $ .chain (asList (1 , 2 , 3 , 4 , 5 , 6 )).find (
334+ final Optional <Integer > resultChain2 = $ .chain (asList (1 , 2 , 3 , 4 , 5 , 6 )).find (
335335 new Predicate <Integer >() {
336336 public Boolean apply (Integer item ) {
337337 return item > 6 ;
@@ -361,14 +361,14 @@ public Boolean apply(Integer item) {
361361 }
362362 });
363363 assertEquals ("Optional.absent()" , result2 .toString ());
364- final Optional <Integer > resultChain = ( Optional < Integer >) $ .chain (asList (1 , 2 , 3 , 4 , 5 , 6 )).findLast (
364+ final Optional <Integer > resultChain = $ .chain (asList (1 , 2 , 3 , 4 , 5 , 6 )).findLast (
365365 new Predicate <Integer >() {
366366 public Boolean apply (Integer item ) {
367367 return item % 2 == 0 ;
368368 }
369369 }).item ();
370370 assertEquals ("Optional.of(6)" , resultChain .toString ());
371- final Optional <Integer > resultChain2 = ( Optional < Integer >) $ .chain (asList (1 , 2 , 3 , 4 , 5 , 6 )).findLast (
371+ final Optional <Integer > resultChain2 = $ .chain (asList (1 , 2 , 3 , 4 , 5 , 6 )).findLast (
372372 new Predicate <Integer >() {
373373 public Boolean apply (Integer item ) {
374374 return item > 6 ;
@@ -473,7 +473,7 @@ public Boolean apply(Integer item) {
473473 return item % 2 == 0 ;
474474 }
475475 });
476- final boolean result1chain = ( Boolean ) $ .chain (asList (1 , 2 , 3 , 4 ))
476+ final boolean result1chain = $ .chain (asList (1 , 2 , 3 , 4 ))
477477 .every (
478478 new Predicate <Integer >() {
479479 public Boolean apply (Integer item ) {
@@ -493,7 +493,7 @@ public Boolean apply(Integer item) {
493493 return item < 5 ;
494494 }
495495 });
496- final boolean result2chain = ( Boolean ) $ .chain (asList (1 , 2 , 3 , 4 ))
496+ final boolean result2chain = $ .chain (asList (1 , 2 , 3 , 4 ))
497497 .every (
498498 new Predicate <Integer >() {
499499 public Boolean apply (Integer item ) {
@@ -606,7 +606,7 @@ public Boolean apply(Integer item) {
606606 return item % 2 == 0 ;
607607 }
608608 });
609- final boolean result1chain = ( Boolean ) $ .chain (asList (1 , 2 , 3 , 4 ))
609+ final boolean result1chain = $ .chain (asList (1 , 2 , 3 , 4 ))
610610 .some (
611611 new Predicate <Integer >() {
612612 public Boolean apply (Integer item ) {
@@ -626,7 +626,7 @@ public Boolean apply(Integer item) {
626626 return item == 5 ;
627627 }
628628 });
629- final boolean result2chain = ( Boolean ) $ .chain (asList (1 , 2 , 3 , 4 ))
629+ final boolean result2chain = $ .chain (asList (1 , 2 , 3 , 4 ))
630630 .some (
631631 new Predicate <Integer >() {
632632 public Boolean apply (Integer item ) {
@@ -661,7 +661,7 @@ public void contains() {
661661 assertTrue (result );
662662 final boolean resultObj = new $ (asList (1 , 2 , 3 )).contains (3 );
663663 assertTrue (resultObj );
664- final boolean resultChain = ( Boolean ) $ .chain (asList (1 , 2 , 3 )).contains (3 ).item ();
664+ final boolean resultChain = $ .chain (asList (1 , 2 , 3 )).contains (3 ).item ();
665665 assertTrue (resultChain );
666666 final boolean result2 = $ .contains (asList (1 , 2 , 3 ), 3 , 1 );
667667 assertTrue (result2 );
@@ -908,7 +908,7 @@ public String toString() {
908908 Tuple .<String , Object >create ("author" , "Shakespeare" ),
909909 Tuple .<String , Object >create ("year" , Integer .valueOf (1611 )))).get ().toString ());
910910 assertEquals ("title: Cymbeline, author: Shakespeare, year: 1611" ,
911- (( Optional < Book >) $ .chain (listOfPlays ).findWhere (asList (
911+ ($ .chain (listOfPlays ).findWhere (asList (
912912 Tuple .<String , Object >create ("author" , "Shakespeare" ),
913913 Tuple .<String , Object >create ("year" , Integer .valueOf (1611 )))).item ()).get ().toString ());
914914 assertEquals ("title: Cymbeline, author: Shakespeare, year: 1611" ,
@@ -942,7 +942,7 @@ public String toString() {
942942 $ .findWhere (listOfPlays2 , asList (
943943 Tuple .<String , Object >create ("getAuthor" , "Shakespeare" ),
944944 Tuple .<String , Object >create ("year" , Integer .valueOf (1611 )))).get ().toString ());
945- assertEquals (Optional .absent (),
945+ assertEquals (Optional .< Book2 > absent (),
946946 $ .findWhere (listOfPlays2 , asList (
947947 Tuple .<String , Object >create ("getAuthor" , "Shakespeare2" ),
948948 Tuple .<String , Object >create ("year" , Integer .valueOf (1611 )))));
0 commit comments