java.awt
Class Point

java.lang.Object
  |
  +--java.awt.Point

public class Point
extends Object

An x,y coordinate.


Field Summary
 int x
          The x coordinate.
 int y
          The y coordinate.
 
Constructor Summary
Point(int x, int y)
          Constructs and initializes a Point from the specified x and y coordinates.
 
Method Summary
 boolean equals(Object obj)
          Checks whether two pointers are equal.
 int hashCode()
          Returns the hashcode for this Point.
 void move(int x, int y)
          Moves the point.
 String toString()
          Returns the String representation of this Point's coordinates.
 void translate(int x, int y)
          Translates the point.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

x

public int x
The x coordinate.


y

public int y
The y coordinate.

Constructor Detail

Point

public Point(int x,
             int y)
Constructs and initializes a Point from the specified x and y coordinates.

Parameters:
x - the x coordinate
y - the y coordinate
Method Detail

move

public void move(int x,
                 int y)
Moves the point.


translate

public void translate(int x,
                      int y)
Translates the point.


hashCode

public int hashCode()
Returns the hashcode for this Point.

Overrides:
hashCode in class Object
See Also:
Hashtable

equals

public boolean equals(Object obj)
Checks whether two pointers are equal.

Overrides:
equals in class Object
Parameters:
obj - the Object to compare with
Returns:
true if these Objects are equal; false otherwise.
See Also:
Hashtable

toString

public String toString()
Returns the String representation of this Point's coordinates.

Overrides:
toString in class Object