FileDocCategorySizeDatePackage
ExceptionUsage.javaAPI DocExample1554Sun Dec 14 22:47:38 GMT 2003oreilly.hcj.exceptions

ExceptionUsage

public class ExceptionUsage extends Object
Demonstrates exception usage, both proper and improper.
author
Robert Simmons jr. (kraythe)
version
$Revision: 1.3 $

Fields Summary
private String
customerName
Storage for a customer name (Required).
Constructors Summary
Methods Summary
public java.lang.StringgetCustomerName()
Getter for the customerName property.

return
The current value of the customerName property.

		return this.customerName;
	
public voidsetCustomerName(java.lang.String customerName)
Setter for the customerName property.

param
customerName The current value for the customerName property.
throws
NullPointerException If the given string is null.
throws
IllegalArgumentException if the given string is of size 0.

		if (customerName == null) {
			throw new NullPointerException();
		}
		if (customerName.length() == 0) {
			throw new IllegalArgumentException();
		}
		this.customerName = customerName;