ch.ethz.mxquery.datamodel
Class MXQueryFloat
java.lang.Object
ch.ethz.mxquery.datamodel.MXQueryFloat
- All Implemented Interfaces:
- MXQueryNumber
public class MXQueryFloat
- extends java.lang.Object
- implements MXQueryNumber
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
VALUE_NAN
public static final java.lang.String VALUE_NAN
- See Also:
- Constant Field Values
VALUE_POS_INFINITY
public static final java.lang.String VALUE_POS_INFINITY
- See Also:
- Constant Field Values
VALUE_NEG_INFINITY
public static final java.lang.String VALUE_NEG_INFINITY
- See Also:
- Constant Field Values
MXQueryFloat
public MXQueryFloat(java.lang.String s)
throws MXQueryException
- Constructors:
- Throws:
MXQueryException
MXQueryFloat
public MXQueryFloat(int i)
MXQueryFloat
public MXQueryFloat(int i1,
int i2)
- MXQueryDouble created by dividing 2 integers
- Parameters:
i1
- tobe dividedi2
- divider
MXQueryFloat
public MXQueryFloat(long l1,
long l2)
- MXQueryDouble created by dividing 2 longs
- Parameters:
l1
- to be dividedl2
- divider
MXQueryFloat
public MXQueryFloat(float f)
equalsZero
public boolean equalsZero()
- Methods:
- Specified by:
equalsZero
in interface MXQueryNumber
add
public MXQueryNumber add(MXQueryNumber d)
- Specified by:
add
in interface MXQueryNumber
add
public MXQueryNumber add(long l)
- Specified by:
add
in interface MXQueryNumber
subtract
public MXQueryNumber subtract(MXQueryNumber d)
- Specified by:
subtract
in interface MXQueryNumber
subtract
public MXQueryNumber subtract(long l)
- Specified by:
subtract
in interface MXQueryNumber
multiply
public MXQueryNumber multiply(MXQueryNumber d)
- Specified by:
multiply
in interface MXQueryNumber
multiply
public MXQueryNumber multiply(long l)
- Specified by:
multiply
in interface MXQueryNumber
divide
public MXQueryNumber divide(MXQueryNumber d)
- Specified by:
divide
in interface MXQueryNumber
divide
public MXQueryNumber divide(long l)
- Specified by:
divide
in interface MXQueryNumber
mod
public MXQueryNumber mod(MXQueryNumber d)
- Specified by:
mod
in interface MXQueryNumber
mod
public MXQueryNumber mod(long l)
- Specified by:
mod
in interface MXQueryNumber
idiv
public long idiv(MXQueryNumber d)
throws MXQueryException
- Specified by:
idiv
in interface MXQueryNumber
- Throws:
MXQueryException
idiv
public long idiv(long i)
throws MXQueryException
- Specified by:
idiv
in interface MXQueryNumber
- Throws:
MXQueryException
isNaN
public boolean isNaN()
- Specified by:
isNaN
in interface MXQueryNumber
isNegativeInfinity
public boolean isNegativeInfinity()
- Specified by:
isNegativeInfinity
in interface MXQueryNumber
isPositiveInfinity
public boolean isPositiveInfinity()
- Specified by:
isPositiveInfinity
in interface MXQueryNumber
hasFractionPart
public boolean hasFractionPart()
equals
public boolean equals(MXQueryNumber d)
- Specified by:
equals
in interface MXQueryNumber
unequals
public boolean unequals(MXQueryNumber d)
- Specified by:
unequals
in interface MXQueryNumber
compareTo
public int compareTo(MXQueryNumber d)
- Specified by:
compareTo
in interface MXQueryNumber
compareTo
public int compareTo(long l)
- Specified by:
compareTo
in interface MXQueryNumber
negate
public MXQueryNumber negate()
- Specified by:
negate
in interface MXQueryNumber
getValue
public double getValue()
getIntValue
public int getIntValue()
throws MXQueryException
- Throws:
MXQueryException
getLongValue
public long getLongValue()
throws MXQueryException
- Specified by:
getLongValue
in interface MXQueryNumber
- Throws:
MXQueryException
round
public MXQueryFloat round()
throws MXQueryException
- Throws:
MXQueryException
toString
public static java.lang.String toString(float val,
java.lang.String javaStrValue,
boolean isNegativeZero)
- Conversion of a float to a string
- Parameters:
val
- the actual double valuejavaStrValue
- the double value converted to string using the Java
conventions. This value is adjusted as necessary to cater
for the differences between the Java and XPath rules.isNegativeZero
-
- Returns:
- the value converted to a string, according to the XPath casting
rules.
toString
public java.lang.String toString()
- Specified by:
toString
in interface MXQueryNumber
- Overrides:
toString
in class java.lang.Object
toTypedString
public java.lang.String toTypedString(boolean isFloat)
toFormatString
public java.lang.String toFormatString(int digit)
toDecimalString
public java.lang.String toDecimalString()
- Specified by:
toDecimalString
in interface MXQueryNumber
getType
public int getType()
- Specified by:
getType
in interface MXQueryNumber
getDoubleValue
public MXQueryDouble getDoubleValue()
- Specified by:
getDoubleValue
in interface MXQueryNumber
getFloatValue
public MXQueryFloat getFloatValue()
- Specified by:
getFloatValue
in interface MXQueryNumber
MXQuery 0.6.0 API Documentation - Copyright 2006-2009 ETH Zurich