|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.qtitools.qti.value.ListValue
public abstract class ListValue
Superclass for multiple and ordered containers.
This container can contain 0..N non NULL single values of the same BaseType.
This container can be multiple, ordered or NULL (if empty).
Cardinality,
BaseType,
Serialized Form| Field Summary | |
|---|---|
protected java.util.List<SingleValue> |
container
Container for single values. |
| Constructor Summary | |
|---|---|
ListValue()
Constructs empty (NULL) ListValue container. |
|
ListValue(SingleValue value)
Constructs empty (NULL) ListValue container and adds given SingleValue into it. |
|
ListValue(SingleValue[] values)
Constructs empty (NULL) ListValue container and adds all given SingleValues into it. |
|
| Method Summary | |
|---|---|
boolean |
add(SingleValue value)
Adds SingleValue into this container. |
java.lang.Object |
clone()
|
boolean |
contains(SingleValue value)
Returns true if this container contains given SingleValue; false otherwise. |
int |
count(SingleValue value)
Returns number of occurrences of given SingleValue. |
SingleValue |
get(int index)
Returns SingleValue on given index. |
java.util.List<SingleValue> |
getAll()
Returns a list of SingleValues. |
BaseType |
getBaseType()
Returns baseType of this value. |
int |
hashCode()
|
boolean |
isNull()
Returns true if this value is NULL or false otherwise. |
abstract boolean |
isOrdered()
Returns true if this container is ordered; false otherwise. |
java.util.Iterator<SingleValue> |
iterator()
|
boolean |
removeAll(SingleValue value)
Removes all occurrences of given SingleValue from this container. |
int |
size()
Returns number of values in this value. |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.qtitools.qti.value.Value |
|---|
getCardinality |
| Field Detail |
|---|
protected java.util.List<SingleValue> container
| Constructor Detail |
|---|
public ListValue()
ListValue container.
public ListValue(SingleValue value)
ListValue container and adds given SingleValue into it.
value - added SingleValuepublic ListValue(SingleValue[] values)
ListValue container and adds all given SingleValues into it.
values - added SingleValues| Method Detail |
|---|
public java.util.Iterator<SingleValue> iterator()
iterator in interface java.lang.Iterable<SingleValue>public boolean isNull()
Value
isNull in interface Valuepublic BaseType getBaseType()
ValueIf value is NULL or record cardinality returns null.
getBaseType in interface Valuepublic int size()
MultiValue
size in interface MultiValuepublic abstract boolean isOrdered()
public boolean contains(SingleValue value)
SingleValue; false otherwise.
value - given SingleValue
SingleValue; false otherwisepublic int count(SingleValue value)
SingleValue.
value - given SingleValue
SingleValuepublic SingleValue get(int index)
SingleValue on given index.
index - given index
SingleValue on given indexpublic java.util.List<SingleValue> getAll()
SingleValues.
SingleValues.
public boolean add(SingleValue value)
throws QTIBaseTypeException
SingleValue into this container.
This container can contain only values of the same BaseType.
NULL SingleValue is ignored.
value - added SingleValue
QTIBaseTypeException - if BaseType is not samepublic boolean removeAll(SingleValue value)
SingleValue from this container.
value - given SingleValue
public java.lang.Object clone()
throws QTIEvaluationException
clone in class java.lang.ObjectQTIEvaluationExceptionpublic int hashCode()
hashCode in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||