public interface Chainable<T>
String name = "Arjun"; int age = 34;
//Assuming EmployeeInfo implements Chainable
employee.setEmployeeInfo( new EmployeeInfo().chain(ei -> ei.setName(name)).chain(ei -> ei.setAge(age)) );
Modifier and Type | Method and Description |
---|---|
default T |
chain(Consumer<T> c) |
Copyright © 2018. All rights reserved.