Package repast.simphony.integration
Class DataContent
- java.lang.Object
-
- org.jdom.Content
-
- repast.simphony.integration.DataContent
-
- All Implemented Interfaces:
Serializable
,Cloneable
public class DataContent extends org.jdom.Content
AContent
that holds a value in it, and when it's getValue method is called will return that value. Used by the JDOM builders for storing values inElement
s.- Author:
- Jerry Vos
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description DataContent()
Creates this without an object to use as data.DataContent(Object data)
Creates this with the specified object as data.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Object
getData()
Retrieves the data to be used in thegetValue()
method.String
getValue()
Retrieves the string value of the data.void
setData(Object data)
Sets the data to be used in thegetValue()
method.String
toString()
This is the same asgetValue()
.
-
-
-
Constructor Detail
-
DataContent
public DataContent()
Creates this without an object to use as data. Before this is used thesetData(Object)
method should be called- See Also:
setData(Object)
-
DataContent
public DataContent(Object data)
Creates this with the specified object as data.- Parameters:
data
- the object to used ingetValue()
- See Also:
getValue()
-
-
Method Detail
-
getValue
public String getValue()
Retrieves the string value of the data.- Specified by:
getValue
in classorg.jdom.Content
- Returns:
- null if the data is null, otherwise
data.toString()
-
getData
public Object getData()
Retrieves the data to be used in thegetValue()
method.- Returns:
- the data object
-
setData
public void setData(Object data)
Sets the data to be used in thegetValue()
method.- Parameters:
data
- the data object
-
toString
public String toString()
This is the same asgetValue()
.- Overrides:
toString
in classObject
- Returns:
- the same as
getValue()
- See Also:
getValue()
-
-