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.
-
height
- The height of the size.
-
width
- The width of the size.
-
ZeroSize
- A null Size.
-
Size()
- Create a Size whose width and height are null.
-
Size(float, float)
- Create a Size with the given width and height.
-
equals(Object)
- Compare an Object to the receiver.
-
isEqualToSize(Size)
- Compare a Size to the receiver.
-
toString()
- Return a textual representation of the receiver.
ZeroSize
public static final Size ZeroSize
- A null Size.
width
public float width
- The width of the size.
height
public float height
- The height of the size.
Size
public Size()
- Create a Size whose width and height are null.
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.
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
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.
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