public interface FloatingPointType<T extends Number & Comparable<T>>
Title: Floating Point Type
Description: Interface to provide a common set of methods for Float and Double types
Copyright: Copyright (c) 2009
Company: Clark & Parsia, LLC.
| Modifier and Type | Method and Description |
|---|---|
T |
cast(Object o)
Casts an object to the class described by this
FloatingPointType object. |
T |
decrement(T n)
Return the next floating point value in the direction of
-Inf |
T |
getNaN()
Gets the Not-a-Number constant for the type.
|
T |
getNegativeInfinity()
Gets the negative infinity constant for the type.
|
T |
getPositiveInfinity()
Gets the positive infinity constant for the type.
|
T |
increment(T n)
Return the next floating point value in the direction of
+Inf |
Number |
intervalSize(T lower,
T upper)
Count the number of floating point values in an inclusive interval
|
boolean |
isInstance(Object o)
Determine if the specified
Object is assignment compatible
with the object represented by this FloatingPointType. |
boolean |
isNaN(T f)
Returns
true if this floating point value is a Not-a-Number
(NaN) value, false otherwise. |
T cast(Object o)
FloatingPointType object.o - the object to casto in the appropriate typeClassCastException - if the object is not null and is no assignable to the type
T.T decrement(T n)
-Inf.n - The value to decrementn > -Inf, the next floating point value in the
direction of -Inf. If n == -Inf,
-Inf.IllegalArgumentException - if n.isNaN()T getNaN()
T.NaNT getNegativeInfinity()
T.NEGATIVE_INFINITYT getPositiveInfinity()
T.POSITIVE_INFINITYT increment(T n)
+Inf.n - The value to incrementn < +Inf, the next floating point value in the
direction of +Inf. If n == +Inf,
+Inf.IllegalArgumentException - if n.isNaN()Number intervalSize(T lower, T upper)
lower - The lower bound of the intervalupper - The upper bound of the intervallower.equals(upper), 1. Else, the
number of floating point values between lower and
upper plus 2boolean isInstance(Object o)
Object is assignment compatible
with the object represented by this FloatingPointType.
Typically implemented as a wrapper for
T.class.isInstance(Object).o - the object to checktrue if o is an instance of
T, false else.boolean isNaN(T f)
true if this floating point value is a Not-a-Number
(NaN) value, false otherwise.f - the value to be testedtrue if the argument is NaN, else falseCopyright © 2019. All rights reserved.