FileDocCategorySizeDatePackage
ImmutablePerson.javaAPI DocExample1860Sun Dec 14 22:47:30 GMT 2003oreilly.hcj.immutable

ImmutablePerson

public class ImmutablePerson extends Object
Some Data Class.
author
Robert (Kraythe) Simmons jr.

Fields Summary
private String
firstName
Holds the first name.
private String
lastName
Holds the last name.
private int
age
Holds the age.
Constructors Summary
public ImmutablePerson(String firstName, String lastName, int age)
Creates a new ImmutablePerson object.

param
firstName The first name for the person.
param
lastName The last name for the person.
param
age The age of the person.
throws
NullPointerException __UNDOCUMENTED__

		if (firstName == null) {
			throw new NullPointerException("firstName");  //$NON-NLS-1$
		}
		if (lastName == null) {
			throw new NullPointerException("lastName");  //$NON-NLS-1$
		}
		this.age = age;
		this.firstName = firstName;
		this.lastName = lastName;
	
Methods Summary
public intgetAge()
Getter for age.

return
Returns the age.

		return age;
	
public java.lang.StringgetFirstName()
Getter for firstName.

return
Returns the firstName.

		return firstName;
	
public java.lang.StringgetLastName()
Getter for lastName.

return
Returns the lastName.

		return lastName;