public class TestletData
extends java.lang.Object
TestletData is the super class of all classes that testlets
use to store data for extension validation.| Constructor and Description |
|---|
TestletData(ObjectID oid)
Creates a new
TestletData for the extension with object ID
oid. |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object obj)
Compares two
TestletData objects. |
V3Extension |
getExtension()
Returns the
TestletData's extension. |
ObjectID |
getObjectID()
Returns the calling
TestletData's object ID. |
V3Extension |
setExtension(V3Extension extension)
Sets a new extension.
|
public TestletData(ObjectID oid)
TestletData for the extension with object ID
oid.oid - the object ID of the extension for which the TestletData
stores datapublic final ObjectID getObjectID()
TestletData's object ID.
If you change the object ID, this method will throw an
IllegalArgumentException.
TestletData's object IDpublic final V3Extension setExtension(V3Extension extension) throws java.lang.IllegalArgumentException
If the TestletData that calls this method already has an
extension, the former extension is replaced and returned.
If no extension exists, this method returns null.
If extension is null, the previously stored
extension is removed. If extension is not null,
the object ID of the extension must be the same as the object ID of the
TestletData that calls this method.
extension - the new extension to be registered stored in the
TestletData. extension can be
nullnulljava.lang.IllegalArgumentException - thrown if the extension's object ID does not
correspond to this TestletData object IDpublic final V3Extension getExtension()
TestletData's extension.setExtension
can be nullpublic final boolean equals(java.lang.Object obj)
TestletData objects.
This method returns true if the object IDs of the two
TestletData objects are the same. If obj is
not a TestletData object, the method returns false
.
equals in class java.lang.Objecttrue if obj is a TestletData
object and if its object ID is the same as the TestletData
calling the method, false otherwise