| java.lang.Object net.sf.saxon.value.Value net.sf.saxon.value.AtomicValue net.sf.saxon.value.NumericValue net.sf.saxon.value.BigIntegerValue
BigIntegerValue | final public class BigIntegerValue extends NumericValue (Code) | | An integer value: note this is a subtype of decimal in XML Schema, not a primitive type.
The class IntegerValue is used to represent xs:integer values that fit comfortably
in a Java long; this class is used to represent xs:integer values outside this range,
including the built-in subtype xs:unsignedLong
|
Method Summary | |
public NumericValue | arithmetic(int operator, NumericValue other, XPathContext context) Evaluate a binary arithmetic operator.
Parameters: operator - the operator to be applied, identified by a constant inthe Tokenizer class Parameters: other - the other operand of the arithmetic expression exception: XPathException - if an arithmetic failure occurs, e.g. | public BigDecimal | asDecimal() | public NumericValue | ceiling() | public int | compareTo(Object other) | public AtomicValue | convertPrimitive(BuiltInAtomicType requiredType, boolean validate, XPathContext context) | public Object | convertToJava(Class target, XPathContext context) | public ValidationException | convertToSubType(AtomicType type, boolean validate) This class allows subtypes of xs:integer to be held, as well as xs:integer values.
This method sets the required type label. | public boolean | effectiveBooleanValue(XPathContext context) | public NumericValue | floor() | public BigInteger | getBigInteger() | public ItemType | getItemType(TypeHierarchy th) | public String | getStringValue() | public int | hashCode() Get the hashCode. | public boolean | isWholeNumber() | public boolean | isWithinLongRange() | public long | longValue() | public static NumericValue | makeValue(BigInteger value) | public NumericValue | negate() | public NumericValue | round() | public NumericValue | roundToHalfEven(int scale) Implement the XPath round-to-half-even() function
Parameters: scale - number of digits required after the decimal point; thevalue -2 (for example) means round to a multiple of 100 if the scale is >=0, return this value unchanged. | public boolean | schemaEquals(Value obj) Compare two values for equality. | public double | signum() |
BigIntegerValue | public BigIntegerValue(long value)(Code) | | |
arithmetic | public NumericValue arithmetic(int operator, NumericValue other, XPathContext context) throws XPathException(Code) | | Evaluate a binary arithmetic operator.
Parameters: operator - the operator to be applied, identified by a constant inthe Tokenizer class Parameters: other - the other operand of the arithmetic expression exception: XPathException - if an arithmetic failure occurs, e.g. divideby zero the result of performing the arithmetic operation |
ceiling | public NumericValue ceiling()(Code) | | Implement the XPath ceiling() function
the integer value, unchanged |
compareTo | public int compareTo(Object other)(Code) | | Compare the value to another numeric value
Parameters: other - the numeric value to be compared to this value -1 if this value is less than the other, 0 if they are equal,+1 if this value is greater |
convertPrimitive | public AtomicValue convertPrimitive(BuiltInAtomicType requiredType, boolean validate, XPathContext context)(Code) | | Convert to target data type
Parameters: requiredType - an integer identifying the required atomic type Parameters: context - an AtomicValue, a value of the required type; or an ErrorValue |
convertToJava | public Object convertToJava(Class target, XPathContext context) throws XPathException(Code) | | Convert to Java object (for passing to external functions)
Parameters: target - The Java class to which conversion is required exception: XPathException - if conversion is not possible, or fails the Java object that results from the conversion; always aninstance of the target class |
convertToSubType | public ValidationException convertToSubType(AtomicType type, boolean validate)(Code) | | This class allows subtypes of xs:integer to be held, as well as xs:integer values.
This method sets the required type label. This method should only be used for values that
Parameters: type - the subtype of integer required null if the operation succeeds, or a ValidationException if the value is out of range |
effectiveBooleanValue | public boolean effectiveBooleanValue(XPathContext context)(Code) | | Return the effective boolean value of this integer
Parameters: context - The dynamic evaluation context; ignored in thisimplementation of the method false if the integer is zero, otherwise true |
floor | public NumericValue floor()(Code) | | Implement the XPath floor() function
the integer value, unchanged |
getBigInteger | public BigInteger getBigInteger()(Code) | | Get the value as a BigInteger
teh value of the xs:integer as a Java BigInteger |
getItemType | public ItemType getItemType(TypeHierarchy th)(Code) | | Determine the data type of the expression
the actual data type Parameters: th - |
getStringValue | public String getStringValue()(Code) | | Get the value as a String
a String representation of the value |
hashCode | public int hashCode()(Code) | | Get the hashCode. This must conform to the rules for other NumericValue hashcodes
See Also: NumericValue.hashCode |
isWholeNumber | public boolean isWholeNumber()(Code) | | Determine whether the value is a whole number, that is, whether it compares
equal to some integer
always true for this implementation |
isWithinLongRange | public boolean isWithinLongRange()(Code) | | |
longValue | public long longValue()(Code) | | Get the value as a long
the value of the xs:integer, as a Java long |
makeValue | public static NumericValue makeValue(BigInteger value)(Code) | | Factory method: makes either an IntegerValue or a BigIntegerValue depending on the value supplied
|
negate | public NumericValue negate()(Code) | | Negate the value
the result of inverting the sign of the value |
round | public NumericValue round()(Code) | | Implement the XPath round() function
the integer value, unchanged |
roundToHalfEven | public NumericValue roundToHalfEven(int scale)(Code) | | Implement the XPath round-to-half-even() function
Parameters: scale - number of digits required after the decimal point; thevalue -2 (for example) means round to a multiple of 100 if the scale is >=0, return this value unchanged. Otherwiseround it to a multiple of 10**-scale |
schemaEquals | public boolean schemaEquals(Value obj)(Code) | | Compare two values for equality. This supports identity constraints in XML Schema,
which allow list-valued elements and attributes to participate in key and uniqueness constraints.
This method returns false if any error occurs during the comparison, or if any of the items
in either sequence is a node rather than an atomic value. The default implementation of
schemaEquals() is the same as equals(), but subclasses can override this.
|
signum | public double signum()(Code) | | Determine whether the value is negative, zero, or positive
-1 if negative, 0 if zero, +1 if positive, NaN if NaN |
Fields inherited from net.sf.saxon.value.Value | final public static Class[] EMPTY_CLASS_ARRAY(Code)(Java Doc)
|
Methods inherited from net.sf.saxon.value.Value | public static Item asItem(ValueRepresentation value, XPathContext context) throws XPathException(Code)(Java Doc) public static SequenceIterator asIterator(ValueRepresentation val, XPathContext context) throws XPathException(Code)(Java Doc) public static Value asValue(ValueRepresentation val)(Code)(Java Doc) public void checkPermittedContents(SchemaType parentType, StaticContext env, boolean whole) throws XPathException(Code)(Java Doc) public static CharSequence collapseWhitespace(CharSequence in)(Code)(Java Doc) public static Object convert(Item item) throws XPathException(Code)(Java Doc) public static Value convertJavaObjectToXPath(Object object, SequenceType requiredType, Configuration config) throws XPathException(Code)(Java Doc) public Object convertToJava(Class target, XPathContext context) throws XPathException(Code)(Java Doc) public void display(int level, NamePool pool, PrintStream out)(Code)(Java Doc) public boolean effectiveBooleanValue(XPathContext context) throws XPathException(Code)(Java Doc) public boolean equals(Object obj)(Code)(Java Doc) public String evaluateAsString(XPathContext context) throws XPathException(Code)(Java Doc) public Item evaluateItem(XPathContext context) throws XPathException(Code)(Java Doc) public int getCardinality()(Code)(Java Doc) final public int getDependencies()(Code)(Java Doc) public ItemType getItemType(TypeHierarchy th)(Code)(Java Doc) public static SequenceIterator getIterator(ValueRepresentation val) throws XPathException(Code)(Java Doc) public int getLength() throws XPathException(Code)(Java Doc) final public Container getParentExpression()(Code)(Java Doc) public int getSpecialProperties()(Code)(Java Doc) public String getStringValue() throws XPathException(Code)(Java Doc) public int hashCode()(Code)(Java Doc) public Item itemAt(int n) throws XPathException(Code)(Java Doc) final public Iterator iterateSubExpressions()(Code)(Java Doc) public static QNameValue makeQNameValue(Object object, Configuration config)(Code)(Java Doc) public static CharSequence normalizeWhitespace(CharSequence in)(Code)(Java Doc) final public Expression optimize(Optimizer opt, StaticContext env, ItemType contextItemType)(Code)(Java Doc) public void process(XPathContext context) throws XPathException(Code)(Java Doc) final public Expression promote(PromotionOffer offer)(Code)(Java Doc) public Value reduce() throws XPathException(Code)(Java Doc) public boolean schemaEquals(Value obj)(Code)(Java Doc) final public Expression simplify(StaticContext env)(Code)(Java Doc) public static double stringToNumber(CharSequence s) throws NumberFormatException(Code)(Java Doc) public String toString()(Code)(Java Doc) public static CharSequence trimWhitespace(CharSequence in)(Code)(Java Doc) final public Expression typeCheck(StaticContext env, ItemType contextItemType)(Code)(Java Doc)
|
|
|