Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com
Answertopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 


org.eclipse.jet.xpath
Class XPathUtil

java.lang.Object
  extended by 
org.eclipse.jet.xpath.XPathUtil

public final class XPathUtil
extends java.lang.Object

Utility class for common XPath operations.


Nested Class Summary
protected static class XPathUtil.NodeSetAdapter
          Adapter for Arrays and Collections into XPath NodeSets
 
Method Summary
static  NodeSet asNodeSet (java.util.Collection collection)
          Return a NodeSet wrapper for the given collection
static  NodeSet asNodeSet (java.lang.Object[] objectArray)
          Return a NodeSet wrapper for the given array.
static boolean xpathBoolean (java.lang.Object object)
          Invoke the XPath 'boolean' function on the argument.
static double xpathNumber (java.lang.Object object)
          Invoke the XPath 'number' function on the argument.
static java.lang.String xpathString (java.lang.Object object)
          Invoke the XPath 'string' function on the argument.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

xpathString

public static java.lang.String xpathString(java.lang.Object object)
Invoke the XPath 'string' function on the argument.

Parameters:
object - the argument to convert to a string. Cannot be null
Returns:
the result of the XPath 'string' function.
Throws:
java.lang.NullPointerException - if object is null.

xpathBoolean

public static boolean xpathBoolean(java.lang.Object object)
Invoke the XPath 'boolean' function on the argument.

Parameters:
object - the argument to convert to a boolean. Cannot be null
Returns:
the result of the XPath 'boolean' function.
Throws:
java.lang.NullPointerException - if object is null.

xpathNumber

public static double xpathNumber(java.lang.Object object)
Invoke the XPath 'number' function on the argument.

Parameters:
object - the argument to convert to a number (double). Cannot be null
Returns:
the result of the XPath 'number' function.
Throws:
java.lang.NullPointerException - if object is null.

asNodeSet

public static 
NodeSet asNodeSet(java.lang.Object[] objectArray)
Return a NodeSet wrapper for the given array.

Parameters:
objectArray - an array of objects.
Returns:
a node set

asNodeSet

public static 
NodeSet asNodeSet(java.util.Collection collection)
Return a NodeSet wrapper for the given collection

Parameters:
collection - a collection
Returns:
a node set

Copyright 2006 IBM Corporation and others.
All Rights Reserved.


 
 
  Published under the terms of the Eclipse Public License Version 1.0 ("EPL") Design by Interspire