com.bbn.openmap.layer.shape
Class ESRIPoint

java.lang.Object
  extended by com.bbn.openmap.layer.shape.ESRIPoint

public class ESRIPoint
extends java.lang.Object

A class representing an x,y coordinate.

Version:
$Revision: 1.3 $ $Date: 2004/10/14 18:06:04 $
Author:
Ray Tomlinson, Tom Mitchell

Field Summary
 double x
          The X coordinate.
 double y
          The Y coordinate.
 
Constructor Summary
ESRIPoint()
          Null constructor.
ESRIPoint(byte[] b, int off)
          Constructs a point from the given data buffer.
ESRIPoint(double _x, double _y)
          Initializes a point with the given coordinates.
 
Method Summary
 boolean equals(java.lang.Object obj)
          Determines equality of this instance with any other instance.
 double getX()
          Returns the X coordinate of this point.
 double getY()
          Returns the Y coordinate of this point.
 int hashCode()
           
 java.lang.String toString()
          Converts this point to an appropriate string representation.
 int write(byte[] b, int off)
          Writes this point to the given buffer at the given offset.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

x

public double x
The X coordinate.


y

public double y
The Y coordinate.

Constructor Detail

ESRIPoint

public ESRIPoint()
Null constructor.


ESRIPoint

public ESRIPoint(double _x,
                 double _y)
Initializes a point with the given coordinates.

Parameters:
_x - the x coordinate
_y - the y coordinate

ESRIPoint

public ESRIPoint(byte[] b,
                 int off)
Constructs a point from the given data buffer.

Parameters:
b - the data buffer
off - the offset into the buffer
Method Detail

getX

public double getX()
Returns the X coordinate of this point.

Returns:
the x coordinate

getY

public double getY()
Returns the Y coordinate of this point.

Returns:
the y coordinate

toString

public java.lang.String toString()
Converts this point to an appropriate string representation.

Overrides:
toString in class java.lang.Object
Returns:
a string representing this point

write

public int write(byte[] b,
                 int off)
Writes this point to the given buffer at the given offset.

Parameters:
b - the data buffer
off - the offset into the buffer
Returns:
then number of bytes written

equals

public boolean equals(java.lang.Object obj)
Determines equality of this instance with any other instance.

Overrides:
equals in class java.lang.Object
Parameters:
obj - another instance
Returns:
true if equal, false otherwise

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object


Copyright (C) BBNT Solutions LLC; See http://openmap.bbn.com/ for details