edu.columbia.cs.coms4701.geometry
Interface Rectangle2D<T extends java.lang.Number>

All Known Implementing Classes:
AbstractRectangle, DiscreteRectangle

public interface Rectangle2D<T extends java.lang.Number>

Interface for classes representing a rectangle in a two-dimensional Cartesian plane. Should be immutable.

Version:
0.1

User: aaron Date: Aug 25, 2006 Time: 10:32:27 AM

Author:
aaron@cs

Method Summary
 Point2D<T> getOrigin()
          Returns the origin, i.e.
 Size2D<T> getSize()
          Returns the size of the rectangle.
 

Method Detail

getOrigin

Point2D<T> getOrigin()
Returns the origin, i.e. the bottom-left corner of rectangle

Returns:
point specifying coordinates of bottom-left corner

getSize

Size2D<T> getSize()
Returns the size of the rectangle. Could be negative, but that would be weird.

Returns:
the size (height & width) of the rectangle.