HiRISE

HiRISE.HiPlan.HiTemp
Class Temperature_Profile.Data

java.lang.Object
  extended by HiRISE.HiPlan.HiTemp.Temperature_Profile.Data
All Implemented Interfaces:
Comparable<Temperature_Profile.Data>
Enclosing class:
Temperature_Profile

public static class Temperature_Profile.Data
extends Object
implements Comparable<Temperature_Profile.Data>

A data sample from the HiTemp temperature profile.

The data sample is comparable to other data samples for sorting. Because only the date component is considered in the Comparable implementation, however, this class imposes an ordering that is inconsistent with equals.


Constructor Summary
Temperature_Profile.Data(Date date, double fpaTemperature, double fpeaTemperature)
          Creates a new data sample with the indicated date and temperatures.
Temperature_Profile.Data(Date date, Temperatures temperatures)
           
Temperature_Profile.Data(long millis, double fpaTemperature, double fpeaTemperature)
           
Temperature_Profile.Data(long millis, Temperatures temperatures)
           
 
Method Summary
 int compareTo(Temperature_Profile.Data d)
          Compares this data sample with another.
 boolean equals(Object o)
          Indicates whether some other object is "equal to" this one.
 Date getDate()
          Gets the date.
 double getFpaTemperature()
          Gets the FPA temperature.
 double getFpeaTemperature()
          Gets the FPEA temperature/
 int hashCode()
          Returns a hash code value for this data sample.
 String toString()
          Gets a string representation of this data sample.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Temperature_Profile.Data

public Temperature_Profile.Data(Date date,
                                double fpaTemperature,
                                double fpeaTemperature)
Creates a new data sample with the indicated date and temperatures.

Parameters:
date - the date of the sample.
fpaTemperature - the FPA temperature.
fpeaTemperature - the FPEA temperature.

Temperature_Profile.Data

public Temperature_Profile.Data(long millis,
                                double fpaTemperature,
                                double fpeaTemperature)

Temperature_Profile.Data

public Temperature_Profile.Data(Date date,
                                Temperatures temperatures)

Temperature_Profile.Data

public Temperature_Profile.Data(long millis,
                                Temperatures temperatures)
Method Detail

getDate

public Date getDate()
Gets the date.

Returns:
the sample's date.

getFpaTemperature

public double getFpaTemperature()
Gets the FPA temperature.

Returns:
the FPA temperature in degrees Celsius.

getFpeaTemperature

public double getFpeaTemperature()
Gets the FPEA temperature/

Returns:
the FPEA temperature in degrees Celsius.

toString

public String toString()
Gets a string representation of this data sample. The string is formatted as a comma-delimited triplet, with the date expressed in seconds since the Unix epoch. (That is, the date is Date.getTime() / 1000.)

Overrides:
toString in class Object
Returns:
a formatted string representation of the data sample.

hashCode

public int hashCode()
Returns a hash code value for this data sample.

Overrides:
hashCode in class Object
Returns:
a hash code calue for this data sample.

equals

public boolean equals(Object o)
Indicates whether some other object is "equal to" this one. A data sample is equal to another if and only if the date and temperatures are the same.

Overrides:
equals in class Object
Parameters:
o - the object to which this object is compared.
Returns:
true if the objects are equal; false otherwise.

compareTo

public int compareTo(Temperature_Profile.Data d)
Compares this data sample with another. The comparison considers only the date component, so this class imposes a sort order that is inconsistent with equals. return -1 if this data sample occurs earlier than the other, 0 if they occur at the sample time, and +1 if it occurs later.

Specified by:
compareTo in interface Comparable<Temperature_Profile.Data>

HiRISE

Copyright (C) Arizona Board of Regents on behalf of the Planetary Image Research Laboratory, Lunar and Planetary Laboratory at the University of Arizona