|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sf.saxon.value.Cardinality
public final class Cardinality
This class contains static methods to manipulate the cardinality property of a type. Cardinality of expressions is denoted by one of the values ONE_OR_MORE, ZERO_OR_MORE, ZERO_OR_ONE, EXACTLY_ONE, or EMPTY. These are combinations of the three bit-significant values ALLOWS_ZERO, ALLOWS_ONE, and ALLOWS_MANY.
Method Summary | |
---|---|
static boolean |
allowsMany(int cardinality)
Determine whether multiple occurrences are allowed |
static boolean |
allowsZero(int cardinality)
Determine whether empty sequence is allowed |
static boolean |
expectsMany(Expression expression)
Determine whether multiple occurrences are not only allowed, but likely. |
static String |
getOccurrenceIndicator(int cardinality)
Get the occurence indicator representing the cardinality |
static int |
multiply(int c1,
int c2)
Multiply two cardinalities |
static boolean |
subsumes(int c1,
int c2)
Test if one cardinality subsumes another. |
static int |
sum(int c1,
int c2)
Add two cardinalities |
static String |
toString(int cardinality)
Display the cardinality as a string |
static int |
union(int c1,
int c2)
Form the union of two cardinalities. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static boolean allowsMany(int cardinality)
cardinality
- the cardinality of a sequence
public static boolean expectsMany(Expression expression)
expression
- an expression
public static boolean allowsZero(int cardinality)
cardinality
- the cardinality of a sequence
public static int union(int c1, int c2)
c1
- a cardinalityc2
- another cardinality
public static int sum(int c1, int c2)
c1
- the first cardinalityc2
- the second cardinality
public static boolean subsumes(int c1, int c2)
c1
- a cardinalityc2
- another cardinality
public static int multiply(int c1, int c2)
c1
- the first cardinalityc2
- the second cardinality
public static String toString(int cardinality)
cardinality
- the cardinality value to be displayed
public static String getOccurrenceIndicator(int cardinality)
cardinality
- the cardinality value
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |