Package de.danielbechler.diff.example.phonebook

Examples of de.danielbechler.diff.example.phonebook.PhoneNumber


  private static void phoneBookExample()
  {
    final PhoneBook phoneBook = new PhoneBook("Breaking Bad");

    final Contact walterWhite = new Contact("Walter", "White");
    walterWhite.setPhoneNumber("Home", new PhoneNumber("1", "505", "316-7871"));
    walterWhite.setPhoneNumber("Work", new PhoneNumber("1", "505", "456-3788"));
    phoneBook.addContact(walterWhite);

    final Contact jessePinkman = new Contact("Jesse", "Pinkman");
    jessePinkman.setPhoneNumber("Home", new PhoneNumber("1", "505", "234-4628"));
    phoneBook.addContact(jessePinkman);

    final PhoneBook modifiedPhoneBook = PhoneBook.from(phoneBook);
    modifiedPhoneBook.getContact("Jesse", "Pinkman").setMiddleName("Bruce");
    modifiedPhoneBook.getContact("Walter", "White").setMiddleName("Hartwell");
View Full Code Here

TOP

Related Classes of de.danielbechler.diff.example.phonebook.PhoneNumber

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.