<objs><obj id="myId" type="my.class.Type" hint="collection">...</obj><objs>
All collection classes in Java are derived from
java.util.Collection.
This specimen is used to store a set of values (whatever type you like) in a box.
The general structure in DDTUnit looks like this:
<obj id="myVector" type="java.util.Vector" hint="collection">
<item type="string">firstEntry</item>
<item type="string">secondEntry</item>
<item type="string">thirdEntry</item>
</obj>
<obj id="myVector" type="vector" hint="collection" valuetype="string">
<item>firstEntry</item>
<item>secondEntry</item>
<item>thirdEntry</item>
</obj>
<obj id="myVector" type="vector" hint="collection" valuetype="string">
<item>firstEntry</item>
<item type="int">4711</item>
<item>thirdEntry</item>
</obj>The item tags can contain every structure that is allowed for
standard obj tags as well.
To specify an empty collection just use an empty xml tag:
<obj id="myVector" type="vector" hint="collection" valuetype="string" />
<obj id="myVector" type="vector" hint="collection" valuetype="string">!NULL!</obj>
Here is an example from the DDTUnit test suite.