public class UType extends Object
Modifier and Type | Field and Description |
---|---|
static UType |
ANY |
static UType |
ANY_ATOMIC |
static UType |
ANY_NODE |
static UType |
ANY_URI |
static UType |
ATTRIBUTE |
static UType |
BASE64_BINARY |
static UType |
BOOLEAN |
static UType |
CHILD_NODE_KINDS |
static UType |
COMMENT |
static UType |
DATE |
static UType |
DATE_TIME |
static UType |
DECIMAL |
static UType |
DOCUMENT |
static UType |
DOUBLE |
static UType |
DURATION |
static UType |
ELEMENT |
static UType |
ELEMENT_OR_ATTRIBUTE |
static UType |
EXTENSION |
static UType |
FLOAT |
static UType |
FUNCTION |
static UType |
G_DAY |
static UType |
G_MONTH |
static UType |
G_MONTH_DAY |
static UType |
G_YEAR |
static UType |
G_YEAR_MONTH |
static UType |
HEX_BINARY |
static UType |
NAMESPACE |
static UType |
NOTATION |
static UType |
NUMERIC |
static UType |
PARENT_NODE_KINDS |
static UType |
PI |
static UType |
QNAME |
static UType |
STRING |
static UType |
STRING_LIKE |
static UType |
TEXT |
static UType |
TIME |
static UType |
UNTYPED_ATOMIC |
static UType |
VOID |
Constructor and Description |
---|
UType(int bits) |
Modifier and Type | Method and Description |
---|---|
Set<PrimitiveUType> |
decompose()
Get a set containing all the primitive types in this UType
|
boolean |
equals(Object obj)
Indicates whether some other object is "equal to" this one.
|
UType |
except(UType other) |
static UType |
fromTypeCode(int code) |
static UType |
getUType(GroundedValue sequence)
Get the UType of a Sequence
|
static UType |
getUType(Item item)
Get the UType of an Item
|
int |
hashCode()
Returns a hash code value for the object.
|
UType |
intersection(UType other) |
static boolean |
isGenerallyComparable(UType t1,
UType t2)
Determine whether two primitive atomic types are comparable under the rules for GeneralComparisons
for the "=" operator (that is, untyped atomic values treated as comparable to anything)
|
static boolean |
isGuaranteedComparable(UType t1,
UType t2)
Determine whether two primitive atomic types are comparable under the rules for ValueComparisons
(that is, untyped atomic values treated as strings), using the "eq" operator
|
static boolean |
isPossiblyComparable(UType t1,
UType t2,
boolean ordered)
Determine whether two primitive atomic types are comparable under the rules for ValueComparisons
(that is, untyped atomic values treated as strings)
|
boolean |
overlaps(UType other)
Determine whether two UTypes have overlapping membership
|
boolean |
subsumes(UType other)
Ask whether one UType subsumes another
|
ItemType |
toItemType()
Obtain (that is, create or get) an itemType that matches all items whose primitive type is one
of the types present in this UType.
|
String |
toString()
Produce a string representation of a UType
|
String |
toStringWithIndefiniteArticle() |
UType |
union(UType other)
Form a UType as the union of two other UTypes
|
public static final UType VOID
public static final UType DOCUMENT
public static final UType ELEMENT
public static final UType ATTRIBUTE
public static final UType TEXT
public static final UType COMMENT
public static final UType PI
public static final UType NAMESPACE
public static final UType FUNCTION
public static final UType STRING
public static final UType BOOLEAN
public static final UType DECIMAL
public static final UType FLOAT
public static final UType DOUBLE
public static final UType DURATION
public static final UType DATE_TIME
public static final UType TIME
public static final UType DATE
public static final UType G_YEAR_MONTH
public static final UType G_YEAR
public static final UType G_MONTH_DAY
public static final UType G_DAY
public static final UType G_MONTH
public static final UType HEX_BINARY
public static final UType BASE64_BINARY
public static final UType ANY_URI
public static final UType QNAME
public static final UType NOTATION
public static final UType UNTYPED_ATOMIC
public static final UType EXTENSION
public static final UType NUMERIC
public static final UType STRING_LIKE
public static final UType CHILD_NODE_KINDS
public static final UType PARENT_NODE_KINDS
public static final UType ELEMENT_OR_ATTRIBUTE
public static final UType ANY_NODE
public static final UType ANY_ATOMIC
public static final UType ANY
public int hashCode()
hashCode
in class Object
Object.equals(Object)
,
Hashtable
public boolean equals(Object obj)
equals
in class Object
obj
- the reference object with which to compare.true
if this object is the same as the obj
argument; false
otherwise.hashCode()
,
Hashtable
public UType union(UType other)
other
- the other UTypepublic static UType fromTypeCode(int code)
public Set<PrimitiveUType> decompose()
public String toString()
public String toStringWithIndefiniteArticle()
public boolean overlaps(UType other)
other
- the second UTypepublic boolean subsumes(UType other)
other
- the second UTypepublic ItemType toItemType()
public static UType getUType(Item item)
item
- the item whose UType is requiredpublic static UType getUType(GroundedValue sequence)
sequence
- the sequence whose UType is requiredpublic static boolean isPossiblyComparable(UType t1, UType t2, boolean ordered)
t1
- the first type to compared.
This must be a primitive atomic type as defined by ItemType.getPrimitiveType()
t2
- the second type to compared.
This must be a primitive atomic type as defined by ItemType.getPrimitiveType()
ordered
- true if testing for an ordering comparison (lt, gt, le, ge). False
if testing for an equality comparison (eq, ne)public static boolean isGuaranteedComparable(UType t1, UType t2)
t1
- the first type to compared.
This must be a primitive atomic type as defined by ItemType.getPrimitiveType()
t2
- the second type to compared.
This must be a primitive atomic type as defined by ItemType.getPrimitiveType()
public static boolean isGenerallyComparable(UType t1, UType t2)
t1
- the first type to compared.
This must be a primitive atomic type as defined by ItemType.getPrimitiveType()
t2
- the second type to compared.
This must be a primitive atomic type as defined by ItemType.getPrimitiveType()
Copyright (c) 2004-2014 Saxonica Limited. All rights reserved.