Package dev.nm.analysis.function.tuple
Class Triple
- java.lang.Object
-
- dev.nm.analysis.function.tuple.Triple
-
public class Triple extends Object
A triple is a tuple of length three. It represents an ordered list of three elements, written by convention as (x, y, z). This class is immutable.- See Also:
- Wikipedia: Tuple
-
-
Constructor Summary
Constructors Constructor Description Triple(double x, double y, double z)
Creates a new triple with the given values.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
toString()
double
x()
Return the value of the first element of the triple.double
y()
Return the value of the second element of the triple.double
z()
Return the value of the third element of the triple.
-
-
-
Method Detail
-
x
public double x()
Return the value of the first element of the triple.- Returns:
- the first element, x
-
y
public double y()
Return the value of the second element of the triple.- Returns:
- the second element, y
-
z
public double z()
Return the value of the third element of the triple.- Returns:
- the third element, z
-
-