| java.lang.Object net.sf.saxon.value.Cardinality
Cardinality | final public class Cardinality (Code) | | 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 | |
final public static int | add(int c1, int c2) | final public static boolean | allowsMany(int cardinality) | final public static boolean | allowsZero(int cardinality) | public static String | getOccurrenceIndicator(int cardinality) | final public static int | multiply(int c1, int c2) | final public static boolean | subsumes(int c1, int c2) Test if one cardinality subsumes another. | final public static int | sum(int c1, int c2) | public static String | toString(int cardinality) | final public static int | union(int c1, int c2) Form the union of two cardinalities. |
add | final public static int add(int c1, int c2)(Code) | | Add two cardinalities
|
allowsMany | final public static boolean allowsMany(int cardinality)(Code) | | Determine whether multiple occurrences are allowed
|
allowsZero | final public static boolean allowsZero(int cardinality)(Code) | | Determine whether empty sequence is allowed
|
getOccurrenceIndicator | public static String getOccurrenceIndicator(int cardinality)(Code) | | Get the occurence indicator representing the cardinality
|
multiply | final public static int multiply(int c1, int c2)(Code) | | Multiply two cardinalities
|
subsumes | final public static boolean subsumes(int c1, int c2)(Code) | | Test if one cardinality subsumes another. Cardinality c1 subsumes c2 if every option permitted
by c2 is also permitted by c1.
Parameters: c1 - a cardinality Parameters: c2 - another cardinality true if if every option permittedby c2 is also permitted by c1. |
sum | final public static int sum(int c1, int c2)(Code) | | Form the sum of two cardinalities
|
toString | public static String toString(int cardinality)(Code) | | Display the cardinality
|
union | final public static int union(int c1, int c2)(Code) | | Form the union of two cardinalities. The cardinality of the expression "if (c) then e1 else e2"
is the union of the cardinalities of e1 and e2.
Parameters: c1 - a cardinality Parameters: c2 - another cardinality the cardinality that allows both c1 and c2 |
|
|