net.sf.saxon.value
public final class FloatValue extends NumericValue
Field Summary | |
---|---|
static Pattern | roundablePattern
Regex indicating that a number may be worth rounding |
Constructor Summary | |
---|---|
FloatValue(CharSequence val)
Constructor supplying a string | |
FloatValue(float value)
Constructor supplying a float |
Method Summary | |
---|---|
NumericValue | arithmetic(int operator, NumericValue other, XPathContext context)
Evaluate a binary arithmetic operator. |
NumericValue | ceiling()
Implement the XPath ceiling() function |
int | compareTo(Object other) |
AtomicValue | convertPrimitive(BuiltInAtomicType requiredType, boolean validate, XPathContext context)
Convert to target data type |
Object | convertToJava(Class target, XPathContext context)
Convert to Java object (for passing to external functions) |
boolean | effectiveBooleanValue(XPathContext context)
Get the effective boolean value |
static CharSequence | floatToString(float value)
Internal method used for conversion of a float to a string |
static CharSequence | floatToStringOLD(float value, String javaString)
Internal method used for conversion of a float to a string |
NumericValue | floor()
Implement the XPath floor() function |
double | getDoubleValue() |
float | getFloatValue()
Get the value |
ItemType | getItemType(TypeHierarchy th)
Determine the data type of the expression |
String | getStringValue()
Get the value as a String |
CharSequence | getStringValueCS()
Get the value as a String |
int | hashCode()
Get the hashCode. |
boolean | isNaN()
Test whether the value is the double/float value NaN |
boolean | isWholeNumber()
Determine whether the value is a whole number, that is, whether it compares
equal to some integer |
NumericValue | negate()
Negate the value |
NumericValue | round()
Implement the XPath round() function |
NumericValue | roundToHalfEven(int scale)
Implement the XPath round-to-half-even() function |
boolean | schemaEquals(Value obj)
Compare two values for equality. |
double | signum()
Determine whether the value is negative, zero, or positive |
Parameters: value the value of the float
Parameters: requiredType an integer identifying the required atomic type context
Returns: an AtomicValue, a value of the required type; or an ErrorValue
Parameters: context
Returns: true unless the value is zero or NaN
Parameters: value the actual value
Returns: the value converted to a string, according to the XPath casting rules.
Parameters: value the actual value javaString the result of converting the float to a string using the Java conventions. This value is adjusted as necessary to cater for the differences between the Java and XPath rules.
Returns: the value converted to a string, according to the XPath casting rules.
Parameters: th
Returns: Type.DOUBLE
Returns: a String representation of the value
Returns: a String representation of the value
See Also: NumericValue
Returns: -1 if negative, 0 if zero (including negative zero), +1 if positive, NaN if NaN