All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class com.apple.alpha.core.Size

java.lang.Object
   |
   +----com.apple.alpha.core.Size

public final class Size
extends Object
This class is used to represent a size. A size has two attributes, its width and its height.


Variable Index

 o height
The height of the size.
 o width
The width of the size.
 o ZeroSize
A null Size.

Constructor Index

 o Size()
Create a Size whose width and height are null.
 o Size(float, float)
Create a Size with the given width and height.

Method Index

 o equals(Object)
Compare an Object to the receiver.
 o isEqualToSize(Size)
Compare a Size to the receiver.
 o toString()
Return a textual representation of the receiver.

Variables

 o ZeroSize
 public static final Size ZeroSize
A null Size.

 o width
 public float width
The width of the size.

 o height
 public float height
The height of the size.

Constructors

 o Size
 public Size()
Create a Size whose width and height are null.

 o Size
 public Size(float w,
             float h)
Create a Size with the given width and height.

Parameters:
w - the width of the new size.
h - the height of the new size.

Methods

 o equals
 public boolean equals(Object o)
Compare an Object to the receiver. Return true if the Object is an instance of the Size class and both objects have the same width and height.

Parameters:
o - the object the receiver is compared against.
Overrides:
equals in class Object
 o isEqualToSize
 public boolean isEqualToSize(Size s)
Compare a Size to the receiver. Return true if both objects have the same width and height.

Parameters:
s - the Size the receiver is compared against.
 o toString
 public String toString()
Return a textual representation of the receiver. A point with width 2 and height 3 will be represented as the string "{width = 2; height = 3}".

Overrides:
toString in class Object

All Packages  Class Hierarchy  This Package  Previous  Next  Index