grs.pds
Class RCoords

java.lang.Object
  |
  +--grs.pds.RCoords
All Implemented Interfaces:
SQLData

public class RCoords
extends Object
implements SQLData

A Cartesian vector struct, matching the SQL type used in the GRS database schema.


Field Summary
 double x
          0th component
 double y
          1st component
 double z
          2nd component
 
Constructor Summary
RCoords()
          Construct a new RCoords, the zero-vector.
RCoords(double x, double y, double z)
          Construct a new RCoords, with vector components x, y, and z.
RCoords(String x, String y, String z)
          Construct a new RCoords, with vector components as Strings.
 
Method Summary
 String getSQLTypeName()
          Return the SQL type name, given when read from the database.
 void readDataStream(DataInputStream in)
          Read the record from DataInputStream.
 void readSQL(SQLInput in, String type)
          Read the record from SQL input.
 String toString()
           
 void writeDataStream(DataOutputStream out)
          Write the record to a DataOutputStream.
 void writeSQL(SQLOutput out)
          Write the record to a SQL output.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

x

public double x
0th component


y

public double y
1st component


z

public double z
2nd component

Constructor Detail

RCoords

public RCoords()
Construct a new RCoords, the zero-vector.


RCoords

public RCoords(double x,
               double y,
               double z)
Construct a new RCoords, with vector components x, y, and z.

Parameters:
x -
y -
z -

RCoords

public RCoords(String x,
               String y,
               String z)
Construct a new RCoords, with vector components as Strings.

Parameters:
x -
y -
z -
Method Detail

toString

public String toString()
Overrides:
toString in class Object

getSQLTypeName

public String getSQLTypeName()
Return the SQL type name, given when read from the database.

Specified by:
getSQLTypeName in interface SQLData
Returns:
name

readSQL

public void readSQL(SQLInput in,
                    String type)
             throws SQLException
Read the record from SQL input.

Specified by:
readSQL in interface SQLData
Parameters:
in - Source to read from.
type - name
Throws:
SQLException - Error reading from stream.

writeSQL

public void writeSQL(SQLOutput out)
              throws SQLException
Write the record to a SQL output.

Specified by:
writeSQL in interface SQLData
Parameters:
out - Stream to write to,
Throws:
SQLException - Error writing to stream.

readDataStream

public void readDataStream(DataInputStream in)
                    throws IOException
Read the record from DataInputStream.

Parameters:
in - Stream to read from.
Throws:
IOException - Error reading from stream.

writeDataStream

public void writeDataStream(DataOutputStream out)
                     throws IOException
Write the record to a DataOutputStream.

Parameters:
out - Stream to write to.
Throws:
IOException - Error writing to stream.


2001 Mars Odyssey Gamma Ray Spectrometer Team