|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD | |||||||||
java.lang.Objectjava.lang.Enum<Cardinality>
org.qtitools.qti.value.Cardinality
public enum Cardinality
This class describes cardinality of value. Supported cardinalities are:
single - one value
multiple - unordered list of values of same type
ordered - ordered list of values of same type
record - unordered list of values of different types
| Enum Constant Summary | |
|---|---|
MULTIPLE
Set of single values (order is not important). |
|
ORDERED
Ordered list of single values (order is important). |
|
RECORD
Set of (key, value) pairs (order is not important). |
|
SINGLE
One single value. |
|
| Field Summary | |
|---|---|
static java.lang.String |
CLASS_TAG
Name of this class in xml schema. |
| Method Summary | |
|---|---|
static Cardinality[] |
intersection(Cardinality[] firstSet,
Cardinality[] secondSet)
Returns intersection of two given cardinalities sets (order is not important). |
boolean |
isList()
Returns true if this cardinality is multiple or ordered; false otherwise. |
boolean |
isMultiple()
Returns true if this cardinality is multiple; false otherwise. |
boolean |
isOrdered()
Returns true if this cardinality is ordered; false otherwise. |
boolean |
isRecord()
Returns true if this cardinality is record; false otherwise. |
boolean |
isSingle()
Returns true if this cardinality is single; false otherwise. |
static Cardinality |
parseCardinality(java.lang.String cardinality)
Returns parsed Cardinality from given String. |
java.lang.String |
toString()
|
static Cardinality |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. |
static Cardinality[] |
values()
Returns an array containing the constants of this enum type, in the order they're declared. |
| Methods inherited from class java.lang.Enum |
|---|
clone, compareTo, equals, getDeclaringClass, hashCode, name, ordinal, valueOf |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Enum Constant Detail |
|---|
public static final Cardinality SINGLE
public static final Cardinality MULTIPLE
public static final Cardinality ORDERED
public static final Cardinality RECORD
| Field Detail |
|---|
public static final java.lang.String CLASS_TAG
| Method Detail |
|---|
public static final Cardinality[] values()
for(Cardinality c : Cardinality.values())
System.out.println(c);
public static Cardinality valueOf(java.lang.String name)
name - the name of the enum constant to be returned.
java.lang.IllegalArgumentException - if this enum type has no constant
with the specified namepublic boolean isSingle()
public boolean isList()
public boolean isMultiple()
public boolean isOrdered()
public boolean isRecord()
public java.lang.String toString()
toString in class java.lang.Enum<Cardinality>
public static Cardinality parseCardinality(java.lang.String cardinality)
throws QTIParseException
Cardinality from given String.
cardinality - String representation of Cardinality
Cardinality from given String
QTIParseException - if given String is not valid Cardinality
public static Cardinality[] intersection(Cardinality[] firstSet,
Cardinality[] secondSet)
firstSet - first set of cardinalitiessecondSet - second set of cardinalities
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD | |||||||||