saaps.dbt
Class Kp

java.lang.Object
  |
  +--saaps.dbt.DatabaseObject
        |
        +--saaps.dbt.Kp
All Implemented Interfaces:
java.io.Serializable

public class Kp
extends DatabaseObject
implements java.io.Serializable

A class for Kp objects. The class contains the date, the Kp value, and a status flag indicating the type of Kp. There are four possible values on that the status flag can have:

Version:
1.2
Author:
Peter Wintoft
See Also:
Serialized Form

Field Summary
private  java.util.Date d
           
private  double kp
           
private static int numberOfIndexes
           
private  double status
           
 
Constructor Summary
Kp()
           
Kp(java.util.Date D)
          This constructor is used if you want an "empty" object with this date.
Kp(java.util.Date D, double KP)
          Deprecated. Replaced by Kp(Date,double[]).
Kp(java.util.Date D, double[] data)
          Construct a Kp object by giving the date and the two data field values.
Kp(java.util.Date D, double kp, double status)
          Construct a Kp object by giving the date and the two data field values.
Kp(long L, double KP)
          Deprecated. Replaced by Kp(long,double[]).
Kp(long L, double[] data)
          Construct a Kp object by giving the date in milliseconds and the two data field values.
Kp(long l, double kp, double status)
          Construct a Kp object by giving the date in milliseconds and the two data field values.
 
Method Summary
 double getData()
           
 double getData(int index)
          This method will return the data value of the DatabaseObject at position "index" converted to a double.
 long getDataSize()
          This method returns the size of the data that is to be written to file
 java.util.Date getDate()
          getDate will return the Date associated with this DatabaseObject
 double getKp()
           
 int getNumberOfDataIndexes()
          getNumberOfDataIndexes will return the number of data "types" this DatabaseObject has.
 double getStatus()
           
 void setDate(java.util.Date D)
           
 void setDate(long L)
           
 void setKp(double KP)
           
 void setStatus(double s)
           
 java.lang.String toString()
           
 
Methods inherited from class saaps.dbt.DatabaseObject
getInstance, getInstance, getObjectSize
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, wait, wait, wait
 

Field Detail

numberOfIndexes

private static int numberOfIndexes

d

private java.util.Date d

kp

private double kp

status

private double status
Constructor Detail

Kp

public Kp()

Kp

public Kp(java.util.Date D)
This constructor is used if you want an "empty" object with this date.

Kp

public Kp(java.util.Date D,
          double kp,
          double status)
Construct a Kp object by giving the date and the two data field values. The data fields are Kp and status.
Parameters:
D - The date.
kp - The Kp value.
status - The status.

Kp

public Kp(long l,
          double kp,
          double status)
Construct a Kp object by giving the date in milliseconds and the two data field values. The data fields are Kp and status.
Parameters:
l - The date in milliseconds.
kp - The Kp value.
status - The status.

Kp

public Kp(java.util.Date D,
          double[] data)
Construct a Kp object by giving the date and the two data field values. The data fields are Kp and status.
Parameters:
D - The date.
data - Array with the the two data field values.

Kp

public Kp(java.util.Date D,
          double KP)
Deprecated. Replaced by Kp(Date,double[]).

Construct a Kp object by giving the date and the Kp value. The status is assumed to be 1.
Parameters:
D - The date.
KP - The Kp value.

Kp

public Kp(long L,
          double[] data)
Construct a Kp object by giving the date in milliseconds and the two data field values. The data fields are Kp and status.
Parameters:
L - The date in milliseconds.
data - Array with the the two data field values.

Kp

public Kp(long L,
          double KP)
Deprecated. Replaced by Kp(long,double[]).

Construct a Kp object by giving the date in milliseconds and the Kp value. The status is assumed to be 1.
Parameters:
L - The date in milliseconds.
KP - The Kp value.
Method Detail

getNumberOfDataIndexes

public int getNumberOfDataIndexes()
Description copied from class: DatabaseObject
getNumberOfDataIndexes will return the number of data "types" this DatabaseObject has.
Overrides:
getNumberOfDataIndexes in class DatabaseObject

getDate

public java.util.Date getDate()
Description copied from class: DatabaseObject
getDate will return the Date associated with this DatabaseObject
Overrides:
getDate in class DatabaseObject

getKp

public double getKp()

getStatus

public double getStatus()

getData

public double getData()

getData

public double getData(int index)
Description copied from class: DatabaseObject
This method will return the data value of the DatabaseObject at position "index" converted to a double. If datavalue index doesn't exist we should either throw an exception or return a value that doesn't represent a number.
Overrides:
getData in class DatabaseObject

getDataSize

public long getDataSize()
                 throws java.io.IOException
This method returns the size of the data that is to be written to file
Overrides:
getDataSize in class DatabaseObject

setDate

public void setDate(java.util.Date D)

setDate

public void setDate(long L)

setKp

public void setKp(double KP)

setStatus

public void setStatus(double s)

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object