FileDocCategorySizeDatePackage
SomeDataObject.javaAPI DocExample1464Sun Dec 14 22:47:36 GMT 2003oreilly.hcj.immutable

SomeDataObject

public class SomeDataObject extends Object
A safe and encapsulated data object.
author
Robert (Kraythe) Simmons jr.

Fields Summary
private Point
coordinate
Holds a coordinate to something.
Constructors Summary
Methods Summary
public java.awt.PointgetCoordinate()
Get the coordinate.

return
The current coordinate object.

		return new Point(coordinate);
	
public voidsetCoordinate(java.awt.Point coordinate)
Set the coordinate.

param
coordinate The new coordinate.
throws
NullPointerException __UNDOCUMENTED__
throws
IllegalArgumentException __UNDOCUMENTED__


	               	 
	     
		if (coordinate == null) {
			throw new NullPointerException("coordinate");  //$NON-NLS-1$
		}
		if ((coordinate.x < 0) || (coordinate.y < 0)) {
			throw new IllegalArgumentException();
		}
		this.coordinate = new Point(coordinate);