diff options
Diffstat (limited to 'org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/Person.java')
-rw-r--r-- | org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/Person.java | 106 |
1 files changed, 106 insertions, 0 deletions
diff --git a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/Person.java b/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/Person.java new file mode 100644 index 000000000..b4064f1b1 --- /dev/null +++ b/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/Person.java @@ -0,0 +1,106 @@ +/******************************************************************************* + * Copyright (c) 2004 - 2005 University Of British Columbia and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * University Of British Columbia - initial API and implementation + *******************************************************************************/ +package org.eclipse.mylar.tasks.tests; + +import java.util.ArrayList; +import java.util.List; + +public class Person { + private String name; + private String emailAddress; + private String phoneNumber; + private int age; + private int id; + private Job job; + + private List<Person> list = new ArrayList<Person>(); + + public Person() { + name = "Ken Sueda"; + id = 1; + age = 22; + emailAddress = "ksueda@hotmail.com"; + phoneNumber = "123-4567"; + job = null; + } + + public Person(String name, String email, String phone, int age, int id) { + this.name = name; + this.emailAddress = email; + this.phoneNumber = phone; + this.age = age; + this.id = id; + this.job = null; + } + + public void add(Person p) { + list.add(p); + } + + public boolean equals(Person p) { + boolean result = true; + result = result && p.name == this.name; + result = result && p.emailAddress == this.emailAddress; + result = result && p.phoneNumber == this.phoneNumber; + result = result && p.age == this.age; + result = result && p.id == this.id; + result = result && p.job.equals(this.job); + return result; + } + + public int getAge() { + return age; + } + + public void setAge(int age) { + this.age = age; + } + + public int getId() { + return id; + } + + public void setId(int id) { + this.id = id; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public String getEmailAddress() { + return emailAddress; + } + + public void setEmailAddress(String emailAddress) { + this.emailAddress = emailAddress; + } + + public String getPhoneNumber() { + return phoneNumber; + } + + public void setPhoneNumber(String phoneNumber) { + this.phoneNumber = phoneNumber; + } + + public Job getJob() { + return job; + } + + public void setJob(Job job) { + this.job = job; + } +} |