Android
android.graphics
public class

android.graphics.Point

java.lang.Object
android.graphics.Point

Point holds two integer coordinates

Summary

Fields

public      int  x   
public      int  y   

Public Constructors

            Point()
            Point(int x, int y)
            Point(Point src)

Public Methods

          boolean  equals(Object o)
Compares the argument to the receiver, and returns true if they represent the same object using a class specific comparison.
    final      boolean  equals(int x, int y)
Returns true if the point's coordinates equal (x,y)
          int  hashCode()
Returns an integer hash code for the receiver.
    final      void  negate()
Negate the point's coordinates
    final      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

Details

Fields

public int x

public int y

Public Constructors

public Point()

public Point(int x, int y)

public Point(Point src)

Public Methods

public boolean equals(Object o)

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 (==).

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.

public final boolean equals(int x, int y)

Returns true if the point's coordinates equal (x,y)

public int hashCode()

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.

Returns

  • int the receiver's hash.

public final void negate()

Negate the point's coordinates

public final void offset(int dx, int dy)

Offset the point's coordinates by dx, dy

public void set(int x, int y)

Set the point's x and y coordinates

public String toString()

Returns a string containing a concise, human-readable description of the receiver.

Returns

  • String a printable representation for the receiver.
Copyright 2007 Google Inc. Build 0.9_r1-98467 - 14 Aug 2008 18:56