Instantly share code, notes, and snippets.

Embed
What would you like to do?
class AddressBook {
private AddressBookRepository repository;
public AddressBook(AddressBookRepository repository) {
this.repository = repository;
}
public Address getAddressById(int i) {
return repository.findById(i);
}
}
class AddressBookRepository {
public Address findById(int i) {
return new Address(i);
}
}
class Address {
private int i;
public Address(int i) {
this.i = i;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment