FileDocCategorySizeDatePackage
Person.javaAPI DocExample888Sun Sep 08 12:49:10 BST 2002com.oreilly.javaxp.junitperf

Person

public class Person extends Object
author
Eric M. Burke
version
$Id: Person.java,v 1.3 2002/09/08 17:49:11 jepc Exp $

Fields Summary
private String
firstName
private String
lastName
Constructors Summary
public Person(String firstName, String lastName)

        if (firstName == null && lastName == null) {
            throw new IllegalArgumentException("Both names cannot be null");
        }
        this.firstName = firstName;
        this.lastName = lastName;
    
Methods Summary
public java.lang.StringgetFirstName()

        return this.firstName;
    
public java.lang.StringgetFullName()

        String first = (this.firstName != null) ? this.firstName : "?";
        String last = (this.lastName != null) ? this.lastName : "?";

        return first + " " + last;
    
public java.lang.StringgetLastName()

        return this.lastName;