<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <!--NewPage--> <HTML> <HEAD> <!-- Generated by javadoc (build 1.6.0_18) on Fri Dec 09 20:48:46 GMT 2011 --> <TITLE> XQSequenceType </TITLE> <META NAME="date" CONTENT="2011-12-09"> <LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style"> <SCRIPT type="text/javascript"> function windowTitle() { if (location.href.indexOf('is-external=true') == -1) { parent.document.title="XQSequenceType"; } } </SCRIPT> <NOSCRIPT> </NOSCRIPT> </HEAD> <BODY BGCOLOR="white" onload="windowTitle();"> <HR> <!-- ========= START OF TOP NAVBAR ======= --> <A NAME="navbar_top"><!-- --></A> <A HREF="#skip-navbar_top" title="Skip navigation links"></A> <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> <TR> <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A NAME="navbar_top_firstrow"><!-- --></A> <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> <TR ALIGN="center" VALIGN="top"> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> </TR> </TABLE> </TD> <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> </EM> </TD> </TR> <TR> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../javax/xml/xquery/XQSequence.html" title="interface in javax.xml.xquery"><B>PREV CLASS</B></A> <A HREF="../../../javax/xml/xquery/XQStackTraceElement.html" title="class in javax.xml.xquery"><B>NEXT CLASS</B></A></FONT></TD> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../index.html?javax/xml/xquery/XQSequenceType.html" target="_top"><B>FRAMES</B></A> <A HREF="XQSequenceType.html" target="_top"><B>NO FRAMES</B></A> <SCRIPT type="text/javascript"> <!-- if(window==top) { document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>'); } //--> </SCRIPT> <NOSCRIPT> <A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A> </NOSCRIPT> </FONT></TD> </TR> <TR> <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> SUMMARY: NESTED | <A HREF="#field_summary">FIELD</A> | CONSTR | <A HREF="#method_summary">METHOD</A></FONT></TD> <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> DETAIL: <A HREF="#field_detail">FIELD</A> | CONSTR | <A HREF="#method_detail">METHOD</A></FONT></TD> </TR> </TABLE> <A NAME="skip-navbar_top"></A> <!-- ========= END OF TOP NAVBAR ========= --> <HR> <!-- ======== START OF CLASS DATA ======== --> <H2> <FONT SIZE="-1"> javax.xml.xquery</FONT> <BR> Interface XQSequenceType</H2> <DL> <DT><B>All Known Subinterfaces:</B> <DD><A HREF="../../../javax/xml/xquery/XQItemType.html" title="interface in javax.xml.xquery">XQItemType</A></DD> </DL> <DL> <DT><B>All Known Implementing Classes:</B> <DD><A HREF="../../../net/sf/saxon/xqj/SaxonXQItemType.html" title="class in net.sf.saxon.xqj">SaxonXQItemType</A>, <A HREF="../../../net/sf/saxon/xqj/SaxonXQSequenceType.html" title="class in net.sf.saxon.xqj">SaxonXQSequenceType</A></DD> </DL> <HR> <DL> <DT><PRE>public interface <B>XQSequenceType</B></DL> </PRE> <P> The <code>XQSequenceType</code> interface represents a sequence type as <a href="http://www.w3.org/TR/xquery"><i>XQuery 1.0: An XML Query language</i></a>. The <code>XQSequenceType</code> is the base interface for the <code>XQItemType</code> interface and contains an occurence indicator. <P> <P> <HR> <P> <!-- =========== FIELD SUMMARY =========== --> <A NAME="field_summary"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> <B>Field Summary</B></FONT></TH> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>static int</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../javax/xml/xquery/XQSequenceType.html#OCC_EMPTY">OCC_EMPTY</A></B></CODE> <BR> </TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>static int</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../javax/xml/xquery/XQSequenceType.html#OCC_EXACTLY_ONE">OCC_EXACTLY_ONE</A></B></CODE> <BR> </TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>static int</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../javax/xml/xquery/XQSequenceType.html#OCC_ONE_OR_MORE">OCC_ONE_OR_MORE</A></B></CODE> <BR> </TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>static int</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../javax/xml/xquery/XQSequenceType.html#OCC_ZERO_OR_MORE">OCC_ZERO_OR_MORE</A></B></CODE> <BR> </TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>static int</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../javax/xml/xquery/XQSequenceType.html#OCC_ZERO_OR_ONE">OCC_ZERO_OR_ONE</A></B></CODE> <BR> </TD> </TR> </TABLE> <!-- ========== METHOD SUMMARY =========== --> <A NAME="method_summary"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> <B>Method Summary</B></FONT></TH> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> boolean</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../javax/xml/xquery/XQSequenceType.html#equals(java.lang.Object)">equals</A></B>(<A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A> o)</CODE> <BR> Compares the specified object with this sequence type for equality.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> int</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../javax/xml/xquery/XQSequenceType.html#getItemOccurrence()">getItemOccurrence</A></B>()</CODE> <BR> Returns the occurrence indicator for the sequence type.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> <A HREF="../../../javax/xml/xquery/XQItemType.html" title="interface in javax.xml.xquery">XQItemType</A></CODE></FONT></TD> <TD><CODE><B><A HREF="../../../javax/xml/xquery/XQSequenceType.html#getItemType()">getItemType</A></B>()</CODE> <BR> Returns the type of the item in the sequence type.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> int</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../javax/xml/xquery/XQSequenceType.html#hashCode()">hashCode</A></B>()</CODE> <BR> Returns a hash code consistent with the definition of the equals method.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A></CODE></FONT></TD> <TD><CODE><B><A HREF="../../../javax/xml/xquery/XQSequenceType.html#toString()">toString</A></B>()</CODE> <BR> Returns a human-readable implementation-defined string representation of the sequence type.</TD> </TR> </TABLE> <P> <!-- ============ FIELD DETAIL =========== --> <A NAME="field_detail"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> <TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"> <B>Field Detail</B></FONT></TH> </TR> </TABLE> <A NAME="OCC_ZERO_OR_ONE"><!-- --></A><H3> OCC_ZERO_OR_ONE</H3> <PRE> static final int <B>OCC_ZERO_OR_ONE</B></PRE> <DL> <DL> <DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#javax.xml.xquery.XQSequenceType.OCC_ZERO_OR_ONE">Constant Field Values</A></DL> </DL> <HR> <A NAME="OCC_EXACTLY_ONE"><!-- --></A><H3> OCC_EXACTLY_ONE</H3> <PRE> static final int <B>OCC_EXACTLY_ONE</B></PRE> <DL> <DL> <DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#javax.xml.xquery.XQSequenceType.OCC_EXACTLY_ONE">Constant Field Values</A></DL> </DL> <HR> <A NAME="OCC_ZERO_OR_MORE"><!-- --></A><H3> OCC_ZERO_OR_MORE</H3> <PRE> static final int <B>OCC_ZERO_OR_MORE</B></PRE> <DL> <DL> <DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#javax.xml.xquery.XQSequenceType.OCC_ZERO_OR_MORE">Constant Field Values</A></DL> </DL> <HR> <A NAME="OCC_ONE_OR_MORE"><!-- --></A><H3> OCC_ONE_OR_MORE</H3> <PRE> static final int <B>OCC_ONE_OR_MORE</B></PRE> <DL> <DL> <DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#javax.xml.xquery.XQSequenceType.OCC_ONE_OR_MORE">Constant Field Values</A></DL> </DL> <HR> <A NAME="OCC_EMPTY"><!-- --></A><H3> OCC_EMPTY</H3> <PRE> static final int <B>OCC_EMPTY</B></PRE> <DL> <DL> <DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#javax.xml.xquery.XQSequenceType.OCC_EMPTY">Constant Field Values</A></DL> </DL> <!-- ============ METHOD DETAIL ========== --> <A NAME="method_detail"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> <TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"> <B>Method Detail</B></FONT></TH> </TR> </TABLE> <A NAME="getItemType()"><!-- --></A><H3> getItemType</H3> <PRE> <A HREF="../../../javax/xml/xquery/XQItemType.html" title="interface in javax.xml.xquery">XQItemType</A> <B>getItemType</B>()</PRE> <DL> <DD>Returns the type of the item in the sequence type. <P> <DD><DL> <DT><B>Returns:</B><DD><code>XQItemType</code> representing the item type in the sequence. <code>null</code> is returned in case of an empty sequence.</DL> </DD> </DL> <HR> <A NAME="getItemOccurrence()"><!-- --></A><H3> getItemOccurrence</H3> <PRE> int <B>getItemOccurrence</B>()</PRE> <DL> <DD>Returns the occurrence indicator for the sequence type. One of: <p> <table> <tr><th>Description</th> <th>Value</th></tr> <tr><td>Zero or one</td> <td><code>OCC_ZERO_OR_ONE</code></td></tr> <tr><td>Exactly one</td> <td><code>OCC_EXACTLY_ONE</code></td></tr> <tr><td>Zero or more</td> <td><code>OCC_ZERO_OR_MORE</code></td></tr> <tr><td>One or more</td> <td><code>OCC_ONE_OR_MORE</code></td></tr> <tr><td>Empty </td> <td><code>OCC_EMPTY</code></td></tr> </table> <br> <P> <DD><DL> <DT><B>Returns:</B><DD><code>int</code> indicating the occurrence indicator</DL> </DD> </DL> <HR> <A NAME="toString()"><!-- --></A><H3> toString</H3> <PRE> <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> <B>toString</B>()</PRE> <DL> <DD>Returns a human-readable implementation-defined string representation of the sequence type. <P> <DD><DL> <DT><B>Overrides:</B><DD><CODE><A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#toString()" title="class or interface in java.lang">toString</A></CODE> in class <CODE><A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A></CODE></DL> </DD> <DD><DL> <DT><B>Returns:</B><DD>a <code>String</code> representation of the sequence type</DL> </DD> </DL> <HR> <A NAME="equals(java.lang.Object)"><!-- --></A><H3> equals</H3> <PRE> boolean <B>equals</B>(<A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A> o)</PRE> <DL> <DD>Compares the specified object with this sequence type for equality. The result is <code>true</code> only if the argument is a sequence type object which represents the same XQuery sequence type. <br> <br> In order to comply with the general contract of <code>equals</code> and <code>hashCode</code> across different implementations the following algorithm must be used. Return <code>true</code> if and only if both objects are <code>XQsequenceType</code> and: <ul> <li><code>getItemOccurrence()</code> is equal</li> <li>if not <code>OCC_EMPTY</code>, <code>getItemType()</code> is equal</li> </ul> <P> <DD><DL> <DT><B>Overrides:</B><DD><CODE><A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#equals(java.lang.Object)" title="class or interface in java.lang">equals</A></CODE> in class <CODE><A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A></CODE></DL> </DD> <DD><DL> <DT><B>Parameters:</B><DD><CODE>o</CODE> - an <code>XQItemType</code> object representing an XQuery sequence type <DT><B>Returns:</B><DD><code>true</code> if the input item type object represents the same XQuery sequence type, <code>false</code> otherwise</DL> </DD> </DL> <HR> <A NAME="hashCode()"><!-- --></A><H3> hashCode</H3> <PRE> int <B>hashCode</B>()</PRE> <DL> <DD>Returns a hash code consistent with the definition of the equals method. <br> <br> In order to comply with the general contract of <code>equals</code> and <code>hashCode</code> across different implementations the following algorithm must be used: <pre> int hashCode; if (getItemOccurrence() == XQSequenceType.OCC_EMPTY) { hashCode = 1; } else { hashCode = getItemOccurrence()*31 + getItemType().hashCode(); } </pre> <P> <DD><DL> <DT><B>Overrides:</B><DD><CODE><A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#hashCode()" title="class or interface in java.lang">hashCode</A></CODE> in class <CODE><A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A></CODE></DL> </DD> <DD><DL> <DT><B>Returns:</B><DD>hash code for this item type</DL> </DD> </DL> <!-- ========= END OF CLASS DATA ========= --> <HR> <!-- ======= START OF BOTTOM NAVBAR ====== --> <A NAME="navbar_bottom"><!-- --></A> <A HREF="#skip-navbar_bottom" title="Skip navigation links"></A> <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> <TR> <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A NAME="navbar_bottom_firstrow"><!-- --></A> <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> <TR ALIGN="center" VALIGN="top"> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> </TR> </TABLE> </TD> <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> </EM> </TD> </TR> <TR> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../javax/xml/xquery/XQSequence.html" title="interface in javax.xml.xquery"><B>PREV CLASS</B></A> <A HREF="../../../javax/xml/xquery/XQStackTraceElement.html" title="class in javax.xml.xquery"><B>NEXT CLASS</B></A></FONT></TD> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../index.html?javax/xml/xquery/XQSequenceType.html" target="_top"><B>FRAMES</B></A> <A HREF="XQSequenceType.html" target="_top"><B>NO FRAMES</B></A> <SCRIPT type="text/javascript"> <!-- if(window==top) { document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>'); } //--> </SCRIPT> <NOSCRIPT> <A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A> </NOSCRIPT> </FONT></TD> </TR> <TR> <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> SUMMARY: NESTED | <A HREF="#field_summary">FIELD</A> | CONSTR | <A HREF="#method_summary">METHOD</A></FONT></TD> <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> DETAIL: <A HREF="#field_detail">FIELD</A> | CONSTR | <A HREF="#method_detail">METHOD</A></FONT></TD> </TR> </TABLE> <A NAME="skip-navbar_bottom"></A> <!-- ======== END OF BOTTOM NAVBAR ======= --> <HR> Copyright (c) 2004-2011 Saxonica Limited. All rights reserved. </BODY> </HTML>