public interface XQSequenceType
XQSequenceType interface represents a sequence type as XQuery 1.0: An XML Query language. The XQSequenceType is the base interface for the XQItemType interface and contains an occurence indicator.| Modifier and Type | Field and Description |
|---|---|
static int |
OCC_EMPTY |
static int |
OCC_EXACTLY_ONE |
static int |
OCC_ONE_OR_MORE |
static int |
OCC_ZERO_OR_MORE |
static int |
OCC_ZERO_OR_ONE |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object o)
Compares the specified object with this sequence type for equality.
|
int |
getItemOccurrence()
Returns the occurrence indicator for the sequence type.
|
XQItemType |
getItemType()
Returns the type of the item in the sequence type.
|
int |
hashCode()
Returns a hash code consistent with the definition of the equals method.
|
java.lang.String |
toString()
Returns a human-readable implementation-defined string representation of the sequence type.
|
static final int OCC_ZERO_OR_ONE
static final int OCC_EXACTLY_ONE
static final int OCC_ZERO_OR_MORE
static final int OCC_ONE_OR_MORE
static final int OCC_EMPTY
XQItemType getItemType()
XQItemType representing the item type in the sequence. null is returned in case of an empty sequence.int getItemOccurrence()
| 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 |
int indicating the occurrence indicatorjava.lang.String toString()
toString in class java.lang.ObjectString representation of the sequence typeboolean equals(java.lang.Object o)
true only if the argument is a sequence type object which represents the same XQuery sequence type.equals and hashCode across different implementations the following algorithm must be used. Return true if and only if both objects are XQsequenceType and:
getItemOccurrence() is equalOCC_EMPTY, getItemType() is equalequals in class java.lang.Objecto - an XQItemType object representing an XQuery sequence typetrue if the input item type object represents the same XQuery sequence type, false otherwiseint hashCode()
equals and hashCode across different implementations the following algorithm must be used:
int hashCode;
if (getItemOccurrence() == XQSequenceType.OCC_EMPTY)
{
hashCode = 1;
}
else
{
hashCode = getItemOccurrence()*31 + getItemType().hashCode();
}
hashCode in class java.lang.Object