Class DataContent

java.lang.Object
org.jdom.Content
repast.simphony.integration.DataContent
All Implemented Interfaces:
Serializable, Cloneable

public class DataContent extends org.jdom.Content
A Content 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 in Elements.
Author:
Jerry Vos
See Also:
  • Field Summary

    Fields inherited from class org.jdom.Content

    parent
  • Constructor Summary

    Constructors
    Constructor
    Description
    Creates this without an object to use as data.
    Creates this with the specified object as data.
  • Method Summary

    Modifier and Type
    Method
    Description
    Retrieves the data to be used in the getValue() method.
    Retrieves the string value of the data.
    void
    Sets the data to be used in the getValue() method.
    This is the same as getValue().

    Methods inherited from class org.jdom.Content

    clone, detach, equals, getDocument, getParent, getParentElement, hashCode, setParent

    Methods inherited from class java.lang.Object

    finalize, getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • DataContent

      public DataContent()
      Creates this without an object to use as data. Before this is used the setData(Object) method should be called
      See Also:
    • DataContent

      public DataContent(Object data)
      Creates this with the specified object as data.
      Parameters:
      data - the object to used in getValue()
      See Also:
  • Method Details

    • getValue

      public String getValue()
      Retrieves the string value of the data.
      Specified by:
      getValue in class org.jdom.Content
      Returns:
      null if the data is null, otherwise data.toString()
    • getData

      public Object getData()
      Retrieves the data to be used in the getValue() method.
      Returns:
      the data object
    • setData

      public void setData(Object data)
      Sets the data to be used in the getValue() method.
      Parameters:
      data - the data object
    • toString

      public String toString()
      This is the same as getValue().
      Overrides:
      toString in class Object
      Returns:
      the same as getValue()
      See Also: