public class IEEEFloatType extends Object implements FloatingPointType<Float>
Title: IEEE Float Type
Description: Implementation of FloatingPointType to support
xsd:float
Copyright: Copyright (c) 2009
Company: Clark & Parsia, LLC.
| Modifier and Type | Method and Description |
|---|---|
Float |
cast(Object o)
Casts an object to the class described by this
FloatingPointType object. |
Float |
decrement(Float n)
Return the next floating point value in the direction of
-Inf |
static IEEEFloatType |
getInstance() |
Float |
getNaN()
Gets the Not-a-Number constant for the type.
|
Float |
getNegativeInfinity()
Gets the negative infinity constant for the type.
|
Float |
getPositiveInfinity()
Gets the positive infinity constant for the type.
|
Float |
increment(Float n)
Return the next floating point value in the direction of
+Inf |
Number |
intervalSize(Float lower,
Float 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(Float f)
Returns
true if this floating point value is a Not-a-Number
(NaN) value, false otherwise. |
public static IEEEFloatType getInstance()
public Float cast(Object o)
FloatingPointTypeFloatingPointType object.cast in interface FloatingPointType<Float>o - the object to casto in the appropriate typepublic Float decrement(Float n)
FloatingPointType-Inf.decrement in interface FloatingPointType<Float>n - The value to decrementn > -Inf, the next floating point value in the
direction of -Inf. If n == -Inf,
-Inf.public Float getNaN()
FloatingPointTypegetNaN in interface FloatingPointType<Float>T.NaNpublic Float getNegativeInfinity()
FloatingPointTypegetNegativeInfinity in interface FloatingPointType<Float>T.NEGATIVE_INFINITYpublic Float getPositiveInfinity()
FloatingPointTypegetPositiveInfinity in interface FloatingPointType<Float>T.POSITIVE_INFINITYpublic Float increment(Float n)
FloatingPointType+Inf.increment in interface FloatingPointType<Float>n - The value to incrementn < +Inf, the next floating point value in the
direction of +Inf. If n == +Inf,
+Inf.public Number intervalSize(Float lower, Float upper)
FloatingPointTypeintervalSize in interface FloatingPointType<Float>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 2public boolean isInstance(Object o)
FloatingPointTypeObject is assignment compatible
with the object represented by this FloatingPointType.
Typically implemented as a wrapper for
T.class.isInstance(Object).isInstance in interface FloatingPointType<Float>o - the object to checktrue if o is an instance of
T, false else.public boolean isNaN(Float f)
FloatingPointTypetrue if this floating point value is a Not-a-Number
(NaN) value, false otherwise.isNaN in interface FloatingPointType<Float>f - the value to be testedtrue if the argument is NaN, else falseCopyright © 2019. All rights reserved.