Created
January 21, 2012 20:25
-
-
Save remeniuk/1653885 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Lens<Address, Integer> addressZipCodeLens = lens( | |
new Function<Address, Integer>() { | |
@Override | |
public Integer apply(@Nullable Address address) { | |
return address.getZipCode(); | |
} | |
}, | |
new Function2<Address, Integer, Address>() { | |
@Override | |
public Address apply(Address address, Integer zipCode) { | |
return new Address(address.getStreet(), address.getCity(), address.getState(), zipCode); | |
} | |
} | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment