/home/oracle/labs/09-LambdaBuiltIns/examples/SalesTxn09/src/com/example/lambda/A07Binary.java
 1 package com.example.lambda;
 2 
 3 import java.util.List;
 4 import java.util.function.BiPredicate;
 5 
 6 /**
 7  *
 8  * @author MikeW
 9  */
10 public class A07Binary {
11   
12   public static void main(String[] args){ 
13 
14     List<SalesTxn> tList = SalesTxn.createTxnList();
15     SalesTxn first = tList.get(0);            
16     String testState = "CA";
17     
18     BiPredicate<SalesTxn,String> stateBiPred = 
19       (t, s) -> t.getState().getStr().equals(s);
20     
21     System.out.println("\n== First is CA?");
22     System.out.println(
23       stateBiPred.test(first, testState));
24   }
25 }
26