< prev index next >

jaxp/src/java.xml/share/classes/javax/xml/xpath/XPathEvaluationResult.java

Print this page




  20  *
  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any
  23  * questions.
  24  */
  25 package javax.xml.xpath;
  26 
  27 import java.util.Objects;
  28 import javax.xml.namespace.QName;
  29 import org.w3c.dom.Node;
  30 /**
  31  * The {@code XPathEvaluationResult} interface represents the result of the
  32  * evaluation of an XPath expression within the context of a particular node.
  33  * The evaluation of an XPath expression can result in various result types as
  34  * defined in XML Path Language (XPath) Version 1.0.
  35  *
  36  * @param <T> the object type returned by the XPath evaluation.
  37  * @see <a href="http://www.w3.org/TR/xpath">XML Path Language (XPath) Version
  38  * 1.0</a>
  39  *
  40  * @since 1.9
  41  */
  42 public interface XPathEvaluationResult<T> {
  43 
  44     /**
  45      * XPathResultType represents possible return types of an XPath evaluation.
  46      * Provided as an enum type, it allows the use of switch statement. At the
  47      * same time, a mapping is provided between the original QName types in
  48      * {@link XPathConstants} and class types used in the generic methods.
  49      */
  50     public static enum XPathResultType {
  51         /**
  52          * Any type that represents any of the 5 other types listed below.
  53          * Maps to {@link XPathEvaluationResult}.
  54          */
  55         ANY(new QName("http://www.w3.org/1999/XSL/Transform", "any"), XPathEvaluationResult.class),
  56         /**
  57          * The XPath 1.0 boolean data type. Maps to Java {@link Boolean}.
  58          */
  59         BOOLEAN(XPathConstants.BOOLEAN, Boolean.class),
  60         /**




  20  *
  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any
  23  * questions.
  24  */
  25 package javax.xml.xpath;
  26 
  27 import java.util.Objects;
  28 import javax.xml.namespace.QName;
  29 import org.w3c.dom.Node;
  30 /**
  31  * The {@code XPathEvaluationResult} interface represents the result of the
  32  * evaluation of an XPath expression within the context of a particular node.
  33  * The evaluation of an XPath expression can result in various result types as
  34  * defined in XML Path Language (XPath) Version 1.0.
  35  *
  36  * @param <T> the object type returned by the XPath evaluation.
  37  * @see <a href="http://www.w3.org/TR/xpath">XML Path Language (XPath) Version
  38  * 1.0</a>
  39  *
  40  * @since 9
  41  */
  42 public interface XPathEvaluationResult<T> {
  43 
  44     /**
  45      * XPathResultType represents possible return types of an XPath evaluation.
  46      * Provided as an enum type, it allows the use of switch statement. At the
  47      * same time, a mapping is provided between the original QName types in
  48      * {@link XPathConstants} and class types used in the generic methods.
  49      */
  50     public static enum XPathResultType {
  51         /**
  52          * Any type that represents any of the 5 other types listed below.
  53          * Maps to {@link XPathEvaluationResult}.
  54          */
  55         ANY(new QName("http://www.w3.org/1999/XSL/Transform", "any"), XPathEvaluationResult.class),
  56         /**
  57          * The XPath 1.0 boolean data type. Maps to Java {@link Boolean}.
  58          */
  59         BOOLEAN(XPathConstants.BOOLEAN, Boolean.class),
  60         /**


< prev index next >