Public Member Functions | List of all members
org.zorbaxquery.api.xqj.ZorbaXQSequenceType Class Reference

The ZorbaXQSequenceType interface represents a sequence type as XQuery 1.0: An XML Query language. More...

Inherits XQSequenceType.

Public Member Functions

boolean equals (Object o)
 Compares the specified object with this sequence type for equality. More...
 
int getItemOccurrence ()
 Returns the occurrence indicator for the sequence type. More...
 
XQItemType getItemType ()
 Returns the type of the item in the sequence type. More...
 
int hashCode ()
 Returns a hash code consistent with the definition of the equals method. More...
 
String toString ()
 Returns a human-readable implementation-defined string representation of the sequence type. More...
 
 ZorbaXQSequenceType (XQItemType type, int occurence)
 

Detailed Description

The ZorbaXQSequenceType interface represents a sequence type as XQuery 1.0: An XML Query language.

The ZorbaXQSequenceType is the base interface for the XQItemType interface and contains an occurence indicator.

Definition at line 24 of file ZorbaXQSequenceType.java.

Constructor & Destructor Documentation

org.zorbaxquery.api.xqj.ZorbaXQSequenceType.ZorbaXQSequenceType ( XQItemType  type,
int  occurence 
)
inline

Member Function Documentation

boolean org.zorbaxquery.api.xqj.ZorbaXQSequenceType.equals ( Object  o)
inline

Compares the specified object with this sequence type for equality.

The result is true only if the argument is a sequence type object which represents the same XQuery sequence type.

In order to comply with the general contract of equals and hashCode across different implementations the following algorithm must be used. Return true if and only if both objects are XQsequenceType and:

Parameters
o- an XQItemType object representing an XQuery sequence type
Returns
true if the input item type object represents the same XQuery sequence type, false otherwise

Definition at line 99 of file ZorbaXQSequenceType.java.

References org.zorbaxquery.api.xqj.ZorbaXQSequenceType.ZorbaXQSequenceType().

int org.zorbaxquery.api.xqj.ZorbaXQSequenceType.getItemOccurrence ( )
inline

Returns the occurrence indicator for the sequence type.

One of:

Description Value Zero or one OCC_ZERO_OR_ONE Exactly one OCC_EXACTLY_ONE Zero or more OCC_ZERO_OR_MORE One or more OCC_ONE_OR_MORE Empty OCC_EMPTY

Returns
int indicating the occurrence indicator

Definition at line 57 of file ZorbaXQSequenceType.java.

XQItemType org.zorbaxquery.api.xqj.ZorbaXQSequenceType.getItemType ( )
inline

Returns the type of the item in the sequence type.

Returns
XQItemType representing the item type in the sequence. null is returned in case of an empty sequence.

Definition at line 39 of file ZorbaXQSequenceType.java.

int org.zorbaxquery.api.xqj.ZorbaXQSequenceType.hashCode ( )
inline

Returns a hash code consistent with the definition of the equals method.

In order to comply with the general contract of equals and hashCode across different implementations the following algorithm must be used:

{
hashCode = 1;
}
else
{
hashCode = getItemOccurrence()*31 + getItemType().hashCode();
}
Returns
hash code for this item type

Definition at line 127 of file ZorbaXQSequenceType.java.

String org.zorbaxquery.api.xqj.ZorbaXQSequenceType.toString ( )
inline

Returns a human-readable implementation-defined string representation of the sequence type.

Returns
a String representation of the sequence type

Definition at line 66 of file ZorbaXQSequenceType.java.


The documentation for this class was generated from the following file:
blog comments powered by Disqus