Build 1.0_r1(from source)

android.graphics
Class Point

java.lang.Object
  extended by android.graphics.Point

public class Point
extends Object

Point holds two integer coordinates


Field Summary
 int x
           
 int y
           
 
Constructor Summary
Point()
           
Point(int x, int y)
           
Point(Point src)
           
 
Method Summary
 boolean equals(int x, int y)
          Returns true if the point's coordinates equal (x,y)
 boolean equals(Object o)
          Compares the argument to the receiver, and returns true if they represent the same object using a class specific comparison.
 int hashCode()
          Returns an integer hash code for the receiver.
 void negate()
          Negate the point's coordinates
 void offset(int dx, int dy)
          Offset the point's coordinates by dx, dy
 void set(int x, int y)
          Set the point's x and y coordinates
 String toString()
          Returns a string containing a concise, human-readable description of the receiver.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

x

public int x

y

public int y
Constructor Detail

Point

public Point()

Point

public Point(int x,
             int y)

Point

public Point(Point src)
Method Detail

set

public void set(int x,
                int y)
Set the point's x and y coordinates


negate

public final void negate()
Negate the point's coordinates


offset

public final void offset(int dx,
                         int dy)
Offset the point's coordinates by dx, dy


equals

public final boolean equals(int x,
                            int y)
Returns true if the point's coordinates equal (x,y)


equals

public boolean equals(Object o)
Description copied from class: Object
Compares the argument to the receiver, and returns true if they represent the same object using a class specific comparison. The implementation in Object returns true only if the argument is the exact same object as the receiver (==).

Overrides:
equals in class Object
Parameters:
o - Object the object to compare with this object.
Returns:
boolean true if the object is the same as this object false if it is different from this object.
See Also:
Object.hashCode()

hashCode

public int hashCode()
Description copied from class: Object
Returns an integer hash code for the receiver. Any two objects which answer true when passed to .equals must answer the same value for this method.

Overrides:
hashCode in class Object
Returns:
int the receiver's hash.
See Also:
Object.equals(java.lang.Object)

toString

public String toString()
Description copied from class: Object
Returns a string containing a concise, human-readable description of the receiver.

Overrides:
toString in class Object
Returns:
String a printable representation for the receiver.

Build 1.0_r1(from source)

Please submit a feedback, bug or feature