我有一個List<Employee> ListEmployee和我使用以下代碼: public void Func(Contract cont) //the contract have the employee's ID in it
{
Employee emp = ListEmployees().Find(e => (e.ID_.Equals(cont.EmployeeId_)));
我正在搞亂lambdas,我試圖創建一個通用的方法來形成一個字段上的類的謂詞。這裏有一些代碼來說明: public class A {
private String b;
private String c;
public A(String b, String c) {
this.b = b;
this.c = c;
}
public String getB()