Java Doc for IntegerValue.java in  » XML » saxonb » net » sf » saxon » value » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » XML » saxonb » net.sf.saxon.value 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   net.sf.saxon.value.Value
      net.sf.saxon.value.AtomicValue
         net.sf.saxon.value.NumericValue
            net.sf.saxon.value.IntegerValue

IntegerValue
final public class IntegerValue extends NumericValue (Code)
An integer value: note this is a subtype of decimal in XML Schema, not a primitive type. This class also supports the built-in subtypes of xs:integer. Actually supports a value in the range permitted by a Java "long"


Field Summary
final public static  IntegerValueMAX_LONG
    
final public static  IntegerValueMINUS_ONE
    
final public static  IntegerValueMIN_LONG
    
final public static  IntegerValuePLUS_ONE
    
final public static  IntegerValueZERO
    

Constructor Summary
public  IntegerValue(long value)
    
public  IntegerValue(long val, AtomicType type)
    

Method Summary
public  NumericValuearithmetic(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  NumericValueceiling()
    
static  booleancheckBigRange(BigInteger big, AtomicType type)
     Check that a BigInteger is within the required range for a given integer subtype.
public  booleancheckRange(AtomicType type)
     This class allows subtypes of xs:integer to be held, as well as xs:integer values.
static  booleancheckRange(long value, AtomicType type)
    
public  intcompareTo(Object other)
    
public  AtomicValueconvertPrimitive(BuiltInAtomicType requiredType, boolean validate, XPathContext context)
    
public  ObjectconvertToJava(Class target, XPathContext context)
    
public  ValidationExceptionconvertToSubtype(AtomicType subtype, boolean validate)
     Convert the value to a subtype of xs:integer
Parameters:
  subtype - the target subtype
Parameters:
  validate - true if validation is required; false if the caller already knows that the value is valid null if the conversion succeeds; a ValidationException describing the failure if it fails.
public  booleaneffectiveBooleanValue(XPathContext context)
    
public  NumericValuefloor()
    
public  ItemTypegetItemType(TypeHierarchy th)
    
public  StringgetStringValue()
    
public  inthashCode()
     Get the hashCode.
public  booleanisWholeNumber()
    
public  longlongValue()
    
public  NumericValuenegate()
    
public  NumericValueround()
    
public  NumericValueroundToHalfEven(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  booleanschemaEquals(Value obj)
     Compare two values for equality.
public  voidsetSubType(AtomicType type)
     This class allows subtypes of xs:integer to be held, as well as xs:integer values. This method sets the required type label.
public  doublesignum()
    
public static  AtomicValuestringToInteger(CharSequence s)
     Static factory method to convert strings to integers.

Field Detail
MAX_LONG
final public static IntegerValue MAX_LONG(Code)
IntegerValue representing the maximum value for this class



MINUS_ONE
final public static IntegerValue MINUS_ONE(Code)
IntegerValue representing the value -1



MIN_LONG
final public static IntegerValue MIN_LONG(Code)
IntegerValue representing the minimum value for this class



PLUS_ONE
final public static IntegerValue PLUS_ONE(Code)
IntegerValue representing the value +1



ZERO
final public static IntegerValue ZERO(Code)
IntegerValue representing the value zero




Constructor Detail
IntegerValue
public IntegerValue(long value)(Code)
Constructor supplying a long
Parameters:
  value - the value of the IntegerValue



IntegerValue
public IntegerValue(long val, AtomicType type) throws DynamicError(Code)
Constructor for a subtype, supplying an integer
Parameters:
  val - The supplied value, as an integer
Parameters:
  type - the required item type, a subtype of xs:integer
exception:
  DynamicError - if the supplied value is out of range for thetarget type




Method Detail
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



checkBigRange
static boolean checkBigRange(BigInteger big, AtomicType type)(Code)
Check that a BigInteger is within the required range for a given integer subtype. This method is expensive, so it should not be used unless the BigInteger is outside the range of a long.



checkRange
public boolean checkRange(AtomicType type)(Code)
This class allows subtypes of xs:integer to be held, as well as xs:integer values. This method checks that the value is within range, and also sets the type label.
Parameters:
  type - the subtype of integer required true if successful, false if value is out of range for the subtype



checkRange
static boolean checkRange(long value, AtomicType type)(Code)
Check that a value is in range for the specified subtype of xs:integer
Parameters:
  value - the value to be checked
Parameters:
  type - the required item type, a subtype of xs:integer true if successful, false if value is out of range for the subtype



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



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 subtype, boolean validate)(Code)
Convert the value to a subtype of xs:integer
Parameters:
  subtype - the target subtype
Parameters:
  validate - true if validation is required; false if the caller already knows that the value is valid null if the conversion succeeds; a ValidationException describing the failure if it fails. Notethat the exception is returned, not thrown.



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



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



longValue
public long longValue()(Code)
Get the value the value of the xs:integer, as a Java long



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.



setSubType
public void setSubType(AtomicType type)(Code)
This class allows subtypes of xs:integer to be held, as well as xs:integer values. This method sets the required type label. It is the caller's responsibility to check that the value is within range.



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



stringToInteger
public static AtomicValue stringToInteger(CharSequence s)(Code)
Static factory method to convert strings to integers.
Parameters:
  s - the String to be converted either an IntegerValue or a BigIntegerValue representing the value of the String, oran ErrorValue encapsulating an Exception if the value cannot be converted.



Methods inherited from net.sf.saxon.value.NumericValue
abstract public NumericValue arithmetic(int operator, NumericValue other, XPathContext context) throws XPathException(Code)(Java Doc)
abstract public NumericValue ceiling()(Code)(Java Doc)
public int compareTo(Object other)(Code)(Java Doc)
final public boolean equals(Object other)(Code)(Java Doc)
abstract public NumericValue floor()(Code)(Java Doc)
public double getDoubleValue()(Code)(Java Doc)
abstract public int hashCode()(Code)(Java Doc)
public static boolean isInteger(AtomicValue value)(Code)(Java Doc)
public boolean isNaN()(Code)(Java Doc)
abstract public boolean isWholeNumber()(Code)(Java Doc)
public long longValue() throws XPathException(Code)(Java Doc)
abstract public NumericValue negate()(Code)(Java Doc)
public static NumericValue parseNumber(String in)(Code)(Java Doc)
public static ItemType promote(ItemType v1, ItemType v2, TypeHierarchy typeHierarchy)(Code)(Java Doc)
abstract public NumericValue round()(Code)(Java Doc)
abstract public NumericValue roundToHalfEven(int scale)(Code)(Java Doc)
abstract public double signum()(Code)(Java Doc)
public String toString()(Code)(Java Doc)

Methods inherited from net.sf.saxon.value.AtomicValue
public void checkPermittedContents(SchemaType parentType, StaticContext env, boolean whole) throws XPathException(Code)(Java Doc)
final public AtomicValue convert(int requiredType, XPathContext context) throws XPathException(Code)(Java Doc)
public AtomicValue convert(AtomicType targetType, XPathContext context, boolean validate)(Code)(Java Doc)
abstract public AtomicValue convertPrimitive(BuiltInAtomicType requiredType, boolean validate, XPathContext context)(Code)(Java Doc)
final public void display(int level, NamePool pool, PrintStream out)(Code)(Java Doc)
public boolean effectiveBooleanValue(XPathContext context) throws XPathException(Code)(Java Doc)
final public String evaluateAsString(XPathContext context)(Code)(Java Doc)
public Item evaluateItem(XPathContext context) throws XPathException(Code)(Java Doc)
final public int getCardinality()(Code)(Java Doc)
public AtomicValue getComponent(int component) throws XPathException(Code)(Java Doc)
public int getImplementationMethod()(Code)(Java Doc)
final public int getLength()(Code)(Java Doc)
public AtomicValue getPrimitiveValue()(Code)(Java Doc)
abstract public String getStringValue()(Code)(Java Doc)
public CharSequence getStringValueCS()(Code)(Java Doc)
final public SequenceIterator getTypedValue()(Code)(Java Doc)
public boolean hasBuiltInType()(Code)(Java Doc)
final public SequenceIterator iterate(XPathContext context)(Code)(Java Doc)
public void process(XPathContext context) throws XPathException(Code)(Java Doc)
public boolean schemaEquals(Value obj)(Code)(Java Doc)
public String toString()(Code)(Java Doc)

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)

Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.