public final class AzimuthHorizontalVertical extends Object implements IEquatable<AzimuthHorizontalVertical>, IEquatableEpsilon<AzimuthHorizontalVertical>, ImmutableValueType
The Azimuth
(get
) is the angular coordinate lying in the local horizontal plane from the Northerly direction to the Easterly direction.
The Horizontal
(get
) is the linear coordinate measured in the local horizontal plane.
The Vertical
(get
) is linear coordinate measured perpendicular to the local horizontal plane.
Constructor and Description |
---|
AzimuthHorizontalVertical()
Initializes a new instance.
|
AzimuthHorizontalVertical(double[] elements)
Initializes a set of
AzimuthHorizontalVertical coordinates from the first 3 consecutive elements in the provided array. |
AzimuthHorizontalVertical(double[] elements,
int startIndex)
Initializes a set of
AzimuthHorizontalVertical coordinates from the provided array. |
AzimuthHorizontalVertical(double azimuth,
double horizontal,
double vertical)
Initializes a set of
AzimuthHorizontalVertical coordinates from the provided values. |
Modifier and Type | Method and Description |
---|---|
static boolean |
equals(AzimuthHorizontalVertical left,
AzimuthHorizontalVertical right)
Returns
true if the two instances are exactly equal. |
boolean |
equals(Object obj)
Indicates whether another object is exactly equal to this instance.
|
boolean |
equalsEpsilon(AzimuthHorizontalVertical other,
double epsilon)
Indicates whether each coordinate value of another instance of this type
is within the required tolerance of the corresponding coordinate value of this instance.
|
boolean |
equalsType(AzimuthHorizontalVertical other)
Indicates whether another instance of this type is exactly equal to this instance.
|
double |
get(int index)
|
double |
getAzimuth()
Gets the angular coordinate lying in the local horizontal plane from the Northerly direction to the Easterly direction.
|
double |
getHorizontal()
Gets the linear coordinate measured in the local horizontal plane.
|
int |
getLength()
Gets the number of elements in this set of coordinates.
|
double |
getVertical()
Gets the linear coordinate measured perpendicular to the local horizontal plane.
|
static AzimuthHorizontalVertical |
getZero()
Gets a set of
AzimuthHorizontalVertical coordinates with values of zero. |
int |
hashCode()
Returns a hash code for this instance, which is suitable for use in hashing algorithms and data structures like a hash table.
|
static boolean |
notEquals(AzimuthHorizontalVertical left,
AzimuthHorizontalVertical right)
Returns
true if the two instances are not exactly equal. |
String |
toString()
Returns the string representation of the value of this instance.
|
public AzimuthHorizontalVertical()
public AzimuthHorizontalVertical(double azimuth, double horizontal, double vertical)
AzimuthHorizontalVertical
coordinates from the provided values.azimuth
- The angular coordinate lying in the local horizontal plane from the Northerly direction to the Easterly direction.horizontal
- The linear coordinate measured in the local horizontal plane.vertical
- The linear coordinate measured perpendicular to the local horizontal plane.public AzimuthHorizontalVertical(@Nonnull double[] elements)
AzimuthHorizontalVertical
coordinates from the first 3 consecutive elements in the provided array.elements
- The array of coordinate values ordered consecutively as azimuth, horizontal, vertical.ArgumentNullException
- Thrown when elements
is null
.ArgumentOutOfRangeException
- Thrown when an object of this type is constructed from an array with less than 3 elements
.public AzimuthHorizontalVertical(@Nonnull double[] elements, int startIndex)
AzimuthHorizontalVertical
coordinates from the provided array.elements
- The array of coordinate values ordered consecutively as azimuth, horizontal, vertical.startIndex
- The index of the first element in the array to use.ArgumentNullException
- Thrown when elements
is null
.ArgumentOutOfRangeException
- Thrown when an object of this type is constructed from an array with less than 3 elements
.@Nonnull public static AzimuthHorizontalVertical getZero()
AzimuthHorizontalVertical
coordinates with values of zero.public final double getAzimuth()
public final double getHorizontal()
public final double getVertical()
public final int getLength()
public final double get(int index)
index
of 0, 1, and 2 corresponding to the coordinates
Azimuth
(get
), Horizontal
(get
), and Vertical
(get
).index
- The index to retrieve.index
.ArgumentOutOfRangeException
- Thrown when index
is less than 0 or greater than or equal to Length
(get
).public boolean equals(Object obj)
equals
in class Object
obj
- The object to compare to this instance.true
if obj
is an instance of this type and represents the same value as this instance; otherwise false
.Object.hashCode()
,
HashMap
public final boolean equalsType(@Nonnull AzimuthHorizontalVertical other)
equalsType
in interface IEquatable<AzimuthHorizontalVertical>
other
- The instance to compare to this instance.true
if other
represents the same value as this instance; otherwise false
.public final boolean equalsEpsilon(@Nonnull AzimuthHorizontalVertical other, double epsilon)
equalsEpsilon
in interface IEquatableEpsilon<AzimuthHorizontalVertical>
other
- The set of AzimuthHorizontalVertical
coordinates to compare to this instance.epsilon
- The limit at which the absolute differences between the coordinate values will not be considered equal.true
if the absolute differences are less than or equal to epsilon
; otherwise false
.public int hashCode()
hashCode
in class Object
Object.equals(java.lang.Object)
,
System.identityHashCode(java.lang.Object)
public String toString()
public static boolean equals(@Nonnull AzimuthHorizontalVertical left, @Nonnull AzimuthHorizontalVertical right)
true
if the two instances are exactly equal.left
- The instance to compare to right
.right
- The instance to compare to left
.true
if left
represents the same value as right
; otherwise false
.public static boolean notEquals(@Nonnull AzimuthHorizontalVertical left, @Nonnull AzimuthHorizontalVertical right)
true
if the two instances are not exactly equal.left
- The instance to compare to right
.right
- The instance to compare to left
.true
if left
does not represent the same value as right
; otherwise false
.