public final class SphericalBounds extends Object implements IEquatable<SphericalBounds>, IEquatableEpsilon<SphericalBounds>, ImmutableValueType
Spherical
values which form the bounds of a range of spherical coordinates.Constructor and Description |
---|
SphericalBounds()
Initializes a new instance.
|
SphericalBounds(Spherical lowerBound,
Spherical upperBound)
Holds two
Spherical values which form the bounds of a range of spherical coordinates. |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj)
Indicates whether another object is exactly equal to this instance.
|
static boolean |
equals(SphericalBounds left,
SphericalBounds right)
Returns
true if the two instances are exactly equal. |
boolean |
equalsEpsilon(SphericalBounds other,
double epsilon)
Indicates whether each value of another instance of this type
is within the required tolerance of the corresponding value of this instance.
|
boolean |
equalsType(SphericalBounds other)
Indicates whether another instance of this type is exactly equal to this instance.
|
Bounds |
getClockBounds()
Gets the bounds for the Clock coordinate.
|
Bounds |
getConeBounds()
Gets the bounds for the Cone coordinate.
|
boolean |
getIsUndefined()
Gets a value indicating whether any of the bounds coordinates for this instance have the value
Double.NaN . |
Spherical |
getLowerBound()
Gets the minimal value defining the bounds.
|
Bounds |
getMagnitudeBounds()
Gets the bounds for the Magnitude coordinate.
|
static SphericalBounds |
getUndefined()
Gets a set of
SphericalBounds with values of Double.NaN . |
Spherical |
getUpperBound()
Gets the maximal value defining the bounds.
|
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(SphericalBounds left,
SphericalBounds right)
Returns
true if the two instances are not exactly equal. |
String |
toString()
Returns the string representation of the value of this instance.
|
public SphericalBounds()
public SphericalBounds(@Nonnull Spherical lowerBound, @Nonnull Spherical upperBound)
Spherical
values which form the bounds of a range of spherical coordinates.lowerBound
- The minimal values defining the bounds.upperBound
- The maximal values defining the bounds.ArgumentException
- Thrown when the upperBound
is less than the lowerBound
or when
one value in any of the coordinates is Double.NaN
and the other is not.@Nonnull public static SphericalBounds getUndefined()
SphericalBounds
with values of Double.NaN
.
Use IsUndefined
(get
) to test whether a SphericalBounds
instance
is undefined since it will return true
if any of the values
are Double.NaN
.
@Nonnull public final Spherical getLowerBound()
@Nonnull public final Spherical getUpperBound()
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 SphericalBounds other)
equalsType
in interface IEquatable<SphericalBounds>
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 SphericalBounds other, double epsilon)
equalsEpsilon
in interface IEquatableEpsilon<SphericalBounds>
other
- The set of SphericalBounds
to compare to this instance.epsilon
- The limit at which the absolute differences between the 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 SphericalBounds left, @Nonnull SphericalBounds 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 SphericalBounds left, @Nonnull SphericalBounds 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
.public final boolean getIsUndefined()
Double.NaN
.@Nonnull public final Bounds getClockBounds()
@Nonnull public final Bounds getMagnitudeBounds()