01: /*******************************************************************************
02: * Copyright (c) 2007 IBM Corporation and others.
03: * All rights reserved. This program and the accompanying materials
04: * are made available under the terms of the Eclipse Public License v1.0
05: * which accompanies this distribution, and is available at
06: * http://www.eclipse.org/legal/epl-v10.html
07: *
08: * Contributors:
09: * IBM Corporation - initial API and implementation
10: ******************************************************************************/package org.eclipse.ui.examples.contributions.model;
11:
12: /**
13: * A simple model object that is mutable.
14: *
15: * @since 3.3
16: */
17: public class Person {
18: private String surname;
19: private String givenname;
20:
21: public Person(String sn, String gn) {
22: surname = sn;
23: givenname = gn;
24: }
25:
26: public String getSurname() {
27: return surname;
28: }
29:
30: public void setSurname(String surname) {
31: this .surname = surname;
32: }
33:
34: public String getGivenname() {
35: return givenname;
36: }
37:
38: public void setGivenname(String givenname) {
39: this .givenname = givenname;
40: }
41:
42: public String toString() {
43: return surname + ", " + givenname; //$NON-NLS-1$
44: }
45: }
|