Package org.eclipse.wst.xml.xpath2.processor.internal.types


org.eclipse.wst.xml.xpath2.processor.internal.types
Class NumericType



public class NumericType
extends org.eclipse.wst.xml.xpath2.processor.internal.types.CtrType
A representation of the NumericType datatype

Constructor Summary

NumericType()

Method Summary

public org.eclipse.wst.xml.xpath2.processor.internal.types.NumericTypeabs()
     Absolutes the number stored
public org.eclipse.wst.xml.xpath2.processor.internal.types.NumericTypeceiling()
     Returns the smallest integer greater than the number stored
public org.eclipse.wst.xml.xpath2.processor.internal.types.NumericTypefloor()
     Returns the largest integer smaller than the number stored
protected org.eclipse.wst.xml.xpath2.api.Itemget_single_arg(org.eclipse.wst.xml.xpath2.api.ResultSequence rs)
    
public static org.eclipse.wst.xml.xpath2.api.Itemget_single_type(org.eclipse.wst.xml.xpath2.api.Item at , java.lang.Class type)
     Check whether the supplied node is of the supplied type
public static org.eclipse.wst.xml.xpath2.api.Itemget_single_type(org.eclipse.wst.xml.xpath2.processor.internal.types.AnyType at , java.lang.Class type)
    
public static org.eclipse.wst.xml.xpath2.processor.internal.types.AnyTypeget_single_type(org.eclipse.wst.xml.xpath2.api.ResultSequence rs , java.lang.Class type)
     Check whether first node in supplied ResultSequence is of the supplied type
public org.eclipse.wst.xml.xpath2.processor.internal.types.NumericTyperound()
     Returns the closest integer of the number stored.
public org.eclipse.wst.xml.xpath2.processor.internal.types.NumericTyperound_half_to_even()
     Returns the closest integer of the number stored.
public org.eclipse.wst.xml.xpath2.processor.internal.types.NumericTyperound_half_to_even(int precision)
    
public org.eclipse.wst.xml.xpath2.api.ResultSequenceunary_minus()
     Creates a new ResultSequence representing the negation of the number stored
public booleanzero()
     Check whether node represnts 0

Constructor Detail

NumericType

public NumericType()


Methods Detail

abs

public org.eclipse.wst.xml.xpath2.processor.internal.types.NumericType abs()

Absolutes the number stored

Returns

org.eclipse.wst.xml.xpath2.processor.internal.types.NumericType - New NumericType representing the absolute of the number stored


ceiling

public org.eclipse.wst.xml.xpath2.processor.internal.types.NumericType ceiling()

Returns the smallest integer greater than the number stored

Returns

org.eclipse.wst.xml.xpath2.processor.internal.types.NumericType - A NumericType representing the smallest integer greater than the number stored


floor

public org.eclipse.wst.xml.xpath2.processor.internal.types.NumericType floor()

Returns the largest integer smaller than the number stored

Returns

org.eclipse.wst.xml.xpath2.processor.internal.types.NumericType - A NumericType representing the largest integer smaller than the number stored


get_single_arg

protected org.eclipse.wst.xml.xpath2.api.Item get_single_arg(org.eclipse.wst.xml.xpath2.api.ResultSequence rs)

Parameters

rs

Returns

org.eclipse.wst.xml.xpath2.api.Item

Throws:

org.eclipse.wst.xml.xpath2.processor.DynamicError


get_single_type

public org.eclipse.wst.xml.xpath2.api.Item get_single_type(org.eclipse.wst.xml.xpath2.api.Item at , java.lang.Class type)

Check whether the supplied node is of the supplied type

Parameters

at - The node being tested

type - The type expected

Returns

org.eclipse.wst.xml.xpath2.api.Item - The node being tested

Throws:

org.eclipse.wst.xml.xpath2.processor.DynamicError - If node being tested is not of expected type


get_single_type

public org.eclipse.wst.xml.xpath2.api.Item get_single_type(org.eclipse.wst.xml.xpath2.processor.internal.types.AnyType at , java.lang.Class type)

Parameters

at

type

Returns

org.eclipse.wst.xml.xpath2.api.Item

Throws:

org.eclipse.wst.xml.xpath2.processor.DynamicError


get_single_type

public org.eclipse.wst.xml.xpath2.processor.internal.types.AnyType get_single_type(org.eclipse.wst.xml.xpath2.api.ResultSequence rs , java.lang.Class type)

Check whether first node in supplied ResultSequence is of the supplied type

Parameters

rs - The node being tested

type - The type expected

Returns

org.eclipse.wst.xml.xpath2.processor.internal.types.AnyType - The node being tested

Throws:

org.eclipse.wst.xml.xpath2.processor.DynamicError - If node being tested is not of expected type


round

public org.eclipse.wst.xml.xpath2.processor.internal.types.NumericType round()

Returns the closest integer of the number stored.

Returns

org.eclipse.wst.xml.xpath2.processor.internal.types.NumericType - A NumericType representing the closest long of the number stored.


round_half_to_even

public org.eclipse.wst.xml.xpath2.processor.internal.types.NumericType round_half_to_even()

Returns the closest integer of the number stored.

Returns

org.eclipse.wst.xml.xpath2.processor.internal.types.NumericType - A NumericType representing the closest long of the number stored.


round_half_to_even

public org.eclipse.wst.xml.xpath2.processor.internal.types.NumericType round_half_to_even(int precision)

Parameters

precision

Returns

org.eclipse.wst.xml.xpath2.processor.internal.types.NumericType


unary_minus

public org.eclipse.wst.xml.xpath2.api.ResultSequence unary_minus()

Creates a new ResultSequence representing the negation of the number stored

Returns

org.eclipse.wst.xml.xpath2.api.ResultSequence - New ResultSequence representing the negation of the number stored


zero

public boolean zero()

Check whether node represnts 0

Returns

boolean - True if node represnts 0. False otherwise