HiRISE

HiRISE.HiPlan.HiSEAS
Class Triplet

java.lang.Object
  extended by HiRISE.HiPlan.HiSEAS.Triplet

public class Triplet
extends Object

A set of three values representing three-dimensional coordinates. To create a new triplet, use the factory method valueOf(double,double,double).

Version:
1.3
Author:
Christian Schaller - UA/PIRL

Field Summary
static String ID
          Class identification name with source code version and date.
 
Method Summary
 boolean equals(Object o)
          Indicates whether some other object is "equal to" this one.
 double getX()
          Get the x-axis coordinate of the triplet.
 double getY()
          Get the y-axis coordinate of the triplet.
 double getZ()
          Get the z-axis coordinate of the triplet.
 int hashCode()
          Returns a hash code value for this stereo target.
 double[] toArray()
          Gets the coordinates as an array.
 String toString()
          Gets a string representation of this stereo target.
static Triplet valueOf(double x, double y, double z)
          Creates a new, immutable triplet from the input coordinates.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

ID

public static final String ID
Class identification name with source code version and date.

See Also:
Constant Field Values
Method Detail

getX

public double getX()
Get the x-axis coordinate of the triplet.

Returns:
the x-axis coordinate.

getY

public double getY()
Get the y-axis coordinate of the triplet.

Returns:
the y-axis coordinate.

getZ

public double getZ()
Get the z-axis coordinate of the triplet.

Returns:
the z-axis coordinate.

toString

public String toString()
Gets a string representation of this stereo target.

Overrides:
toString in class Object
Returns:
a string representation of this stereo target.

hashCode

public int hashCode()
Returns a hash code value for this stereo target.

Overrides:
hashCode in class Object
Returns:
a hash code value for this stereo target.

equals

public boolean equals(Object o)
Indicates whether some other object is "equal to" this one. A triplet is equal to another if and only if each coordinate is 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.

toArray

public double[] toArray()
Gets the coordinates as an array. The first element is the x-axis, the second is the y-axis, and the third is the z-axis coordinate.

Returns:
the triplet coordinates as an array.

valueOf

public static Triplet valueOf(double x,
                              double y,
                              double z)
Creates a new, immutable triplet from the input coordinates.

Parameters:
x - the x-axis coordinate.
y - the y-axis coordinate.
z - the z-axis coordinate.
Returns:
an immutable triplet.

HiRISE

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