Skip to content

Commit

Permalink
rename persons to people
Browse files Browse the repository at this point in the history
  • Loading branch information
jtattermusch committed Jul 20, 2015
1 parent 359d32d commit b0e5ba6
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion examples/AddPerson.java
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ public static void main(String[] args) throws Exception {
}

// Add an address.
addressBook.addPersons(
addressBook.addPeople(
PromptForAddress(new BufferedReader(new InputStreamReader(System.in)),
System.out));

Expand Down
2 changes: 1 addition & 1 deletion examples/ListPeople.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
class ListPeople {
// Iterates though all people in the AddressBook and prints info about them.
static void Print(AddressBook addressBook) {
for (Person person: addressBook.getPersonsList()) {
for (Person person: addressBook.getPeopleList()) {
System.out.println("Person ID: " + person.getId());
System.out.println(" Name: " + person.getName());
if (!person.getEmail().isEmpty()) {
Expand Down
2 changes: 1 addition & 1 deletion examples/add_person.cc
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ int main(int argc, char* argv[]) {
}

// Add an address.
PromptForAddress(address_book.add_persons());
PromptForAddress(address_book.add_people());

{
// Write the new address book back to disk.
Expand Down
2 changes: 1 addition & 1 deletion examples/add_person.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ def PromptForAddress(person):
print sys.argv[1] + ": File not found. Creating a new file."

# Add an address.
PromptForAddress(address_book.persons.add())
PromptForAddress(address_book.people.add())

# Write the new address book back to disk.
f = open(sys.argv[1], "wb")
Expand Down
2 changes: 1 addition & 1 deletion examples/addressbook.proto
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,5 @@ message Person {

// Our address book file is just one of these.
message AddressBook {
repeated Person persons = 1;
repeated Person people = 1;
}
4 changes: 2 additions & 2 deletions examples/list_people.cc
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ using namespace std;

// Iterates though all people in the AddressBook and prints info about them.
void ListPeople(const tutorial::AddressBook& address_book) {
for (int i = 0; i < address_book.persons_size(); i++) {
const tutorial::Person& person = address_book.persons(i);
for (int i = 0; i < address_book.people_size(); i++) {
const tutorial::Person& person = address_book.people(i);

cout << "Person ID: " << person.id() << endl;
cout << " Name: " << person.name() << endl;
Expand Down
2 changes: 1 addition & 1 deletion examples/list_people.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

# Iterates though all people in the AddressBook and prints info about them.
def ListPeople(address_book):
for person in address_book.persons:
for person in address_book.people:
print "Person ID:", person.id
print " Name:", person.name
if person.email != "":
Expand Down

0 comments on commit b0e5ba6

Please sign in to comment.